[X-Unix] text file parsing?

Ben Gold bgold at acedsl.com
Wed May 3 09:34:02 PDT 2006


Björn, Robert,

Thanks... almost there.

The strings command got rid of the binary garbage and effectively  
deleted the first line.  I'm still left with a bunch of ASCII garbage  
at the end of the file.
Using sed, I did the following:

		sed '/Pattern/, $d' OldFile > NewFile

Which almost works perfectly!  The only problem is that sed omits the  
Pattern along with the lines that follow it.  I want it to omit only  
everything after Pattern, so the resulting file ends with Pattern.

I've done about 15 minutes of looking on a website but cannot get  
any  syntax to work.

Thanks in advance for anymore help,

Ben



More information about the X-Unix mailing list