The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: sed error
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 04-28-2008
f_o_555 f_o_555 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 69
of course the strings are different:
here is the script

S00="BLOCK-NAMES /ELM1 /SAUT0 /FIT00"
S01="BLOCK-NAMES /ELM1 /SAUT0 /FIT01"
S02="BLOCK-NAMES /ELM1 /SAUT0 /FIT02"
S03="BLOCK-NAMES /ELM1 /SAUT0 /FIT03"

sed 's/$S00/$S01/g' pb206.cnt > tmp1
sed 's/$S00/$S02/g' pb206.cnt > tmp2
sed 's/$S00/$S03/g' pb206.cnt > tmp3

but tmp1, tmp2 and tmp3 are the same as pb206.cnt (which contains S00)