1834255 Members
2647 Online
110066 Solutions
New Discussion

Awk

 
Vanquish
Occasional Advisor

Awk

hi

awk '//,/<\/tag>/'filein >fileout

prints what is in between tags to out put file,i want to print what is outside these tags.
Thanks
3 REPLIES 3
Sundar_7
Honored Contributor

Re: Awk

Hi,

sed '//,/<\/tag>/d' filein > fileout

Sundar
Learn What to do ,How to do and more importantly When to do ?
curt larson_1
Honored Contributor

Re: Awk

one way to try would be:

awk '
//,/<\/tag>/ {next;}
{print $0;
}'filein >fileout
Francisco J. Soler
Honored Contributor

Re: Awk

Hi Vanquish,

awk '//,/<\/Manifest>/ {flag=1}
{if (!flag) print ; flag=0} ' file_in > f_out

It is not a whole line there are two lines.

Frank.
Linux?. Yes, of course.