sed not working for loop
$sed -i '/abcd/d' file1
this works - deletes the line containing abcd in file1 but below does not work $i='ab bc cd de' $for j in $i;do sed '/$j/d' file1;done This loop do not delete lines containg ab,bc,cd,de. Any help? |
Hi,
You are using single quotes in the sed part, change those to double quotes: Code:
i='ab bc cd de' |
Thanks druuna..
|
You're welcome :)
BTW: Can you put up the [SOLVED] tag. first post -> Thread Tools -> Mark this thread as solved |
All times are GMT -5. The time now is 07:58 PM. |