Darsh
1
hi , i would like to parse some file with the fallowing data :
data data data "unwanted data" data data "unwanted data"
data data data data #unwanted data.
what i want it to have any coments between "" and after # to be erased using awk or/and sed.
has anyone an idea?
thanks.
Something like:
[GNU Sed]
sed 's/\("[^"]*"\|#.*\)//g' file
Other seds:
sed 's/"[^"]*"//g;s/#.*//' file
sed -e 's/#.*//g' -e 's/"[^"]*"//g' infile
should do what you want
Darsh
4
thanks a lot.
sed 's/"[^"]*"//g;s/#.*//' file does exactly what i want.