The simplest method to use variables in a sed command is to enclose your sed command 
in double quotes ( ") instead of single quotes ( '). Because the shell performs 
variable substitution on double-quoted strings, the shell will substitute the value of 
any variables you specify before sed executes. 

For example, the command 

sed "/$DEL/d" file1 > file2

deletes all the lines in file1 that contain the value stored in the variable $DEL.

















---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing
-- 
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

Reply via email to