Hi,
I am using sed command to replace following line in gz file-
sed -n 's/""COS_12_TM_1" ( 1101110101001001010011110100000010110100010010000000100000000010XX010000000 )"/""COS_12_TM_1" ( 110111010100100101001111MM00000010110100010010000000100000000010XX010000000 )"/g' filename.gz
$x= ""COS_12_TM_1" ( 1101110101001001010011110100000010110100010010000000100000000010XX010000000 )"
$y=""COS_12_TM_1" ( 110111010100100101001111MM00000010110100010010000000100000000010XX010000000 )"
eg. sed 's/$x/$y/g'
Can anyone tell me correct way to do this.Because it is not working.
Both the strings $x
and $y
are present in different files($x in list and $y in Masked_list).
Also need help in using nested foreach loop ,Following is the script I am trying to run-
set x=`cat list`
set y=`cat Masked_list`
foreach org ( $x )
echo "$org" >> list_1
foreach masked ( $y )
echo "$masked" >> list_2
`sed -n 's/$org/$masked/g' lw20_82_55_ac_0x19E1.wgl.gz` >> new_wgl
set tmp_2=`grep $org new_wgl`
if ( $tmp_2 == " " ) then
echo "Flip Flop MAsekd in the Original WGL File"
end
endif
end
Thanks in advance!!!