Guest_imported
New member
- Jan 1, 1970
- 0
I'm using an input variable in the sed command which gets ignoored. Here is the part of the script that doesn't work.
##############
echo "\nPlease Enter exactly the string that you want to change...\c"
read ans1
sed 's/ $ans1/ALEXGGG/' infile >outfile
#############
If I don't use the variable the string is changed. Please help.
##############
echo "\nPlease Enter exactly the string that you want to change...\c"
read ans1
sed 's/ $ans1/ALEXGGG/' infile >outfile
#############
If I don't use the variable the string is changed. Please help.