In article <652 at sagpd1.UUCP> jharkins at sagpd1.UUCP (Jim Harkins) writes: > sed 's/foo/$i/' < $i > tmp >But what this does is replace 'foo' with '$i', not the filename. Not surprising when you consider that the shell does not perform variable substitution within ''-quoted strings. Use "" instead, or arrange for the $i to be outside the quotes.