Chetan wrote:
> Sebastian Busch <[EMAIL PROTECTED]> writes:
> 
>> Steve Holden wrote:
>>> Sebastian Busch wrote:
>>>> [EMAIL PROTECTED] wrote:
>>>>> ... I would like to remove two lines from a file. ...
>>>> ... grep -v ...
>>> ... show ...
>> grep -v "`grep -v "commentsymbol" yourfile | head -2`" yourfile
>> ...
> I don't have the original post to know exactly what is needed, but looks like
> something that can be done by a single sed script. 
> 
> -Chetan

Hey!

The task is:

"Remove the first two lines that don't begin with "@" from a file."


Actually, the grep-thing I offered will also delete copies of these two
lines that occur in another place. That should be no problem if the file
is something like

@comment
deleteme
deleteme
@comment
data: x-y-dy

However, if this is not the case, it cannot be done this way.
How would you do it with sed?

Best,
Sebastian.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to