1

sed command

view story
linux-howto

http://www.unix.com – Hi all! Need a little help on a sed command that I've used in the past, but I'd like to change it up a bit. Here is my script Code: SearchVal = "RED" ReplaceVal = "BLUE" wrkFile = /u/tmp/file1 srcFile = /usr/temp/prodfile sed "/${SearchVal}/s/^\(.\{101\}\).\{7\}/\1${ReplaceVal}/" $wrkFile > $srcFile What I'm looking to do is rather than using variables, I'd like to just perform the sed command without variables. Such as.... Code: sed "/${RED}/s/^\(.\{101\}\).\{7\}/\1${BLUE}/" /u/tmp/file1 > /usr/temp/prodfile I've tried with (HowTos)