There are two ways to do this:
1) use double quotes
sed "s/$1/pitt/g"
2) build the command as a string and run it with eval
SEDCMD="s/$1/pitt/g" eval sed $SEDCMD
The eval method works and is very flexible, but it is considered dangerous because it is vulnerable to code injection. If you do not trust your inputs, do not use # 2
UPDATE: the comments are right, there is no use for using eval (I used to use eval all the time with sed this way, and I'm not sure why ....) builds a series of lines for later use, however, is powerful: so I will add new 3) and leave 2 for folk to mock
3) create the command as a string and then run 1 or more of them
FOO='s/\(.*\)bar/\1baz/' BAR="s/$1/pitt/g" sed -e $BAR -e $FOO <infile >outfile
source share