skip first line using sed

skip first line using sed

am 26.07.2005 19:24:53 von oraustin

First thanks for help with my other posts - sed skills progressing
slowly :)
I'd like to delete all lines containtg the word "Network" except the
first line in the file but all variations of the syntax I've tried
won't work.
Please can someone tell me how to correctly form this command.

Re: skip first line using sed

am 26.07.2005 19:36:56 von William Park

oraustin@hotmail.com wrote:
> First thanks for help with my other posts - sed skills progressing
> slowly :)
> I'd like to delete all lines containtg the word "Network" except the
> first line in the file but all variations of the syntax I've tried
> won't work.
> Please can someone tell me how to correctly form this command.

sed '1n; /Network/d'

--
William Park , Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/

Re: skip first line using sed

am 26.07.2005 23:27:51 von someone

oraustin@hotmail.com wrote:
> First thanks for help with my other posts - sed skills progressing
> slowly :)
> I'd like to delete all lines containtg the word "Network" except the
> first line in the file but all variations of the syntax I've tried
> won't work.
> Please can someone tell me how to correctly form this command.

perl -ne'?Network?&&print;/Network/||print' yourfile


John
--
use Perl;
program
fulfillment

Re: skip first line using sed

am 27.07.2005 10:49:33 von oraustin

>sed '1n; /Network/d'
Thanks William did the trick - I was no where near

- John - Perl is next I think we're going to use it as our all singing
all dancing file manipulation language under the Visual Perl guise from
ActiveState - any comment?

Re: skip first line using sed

am 27.07.2005 12:22:05 von someone

oraustin@hotmail.com wrote:
>>sed '1n; /Network/d'
> Thanks William did the trick - I was no where near
>
> - John - Perl is next I think we're going to use it as our all singing
> all dancing file manipulation language under the Visual Perl guise from
> ActiveState - any comment?

Well ... I don't use Windows, and I don't use an IDE. For editing I
usually use MC's built-in editor or sometimes VIM or maybe NEdit or Kate
but most of the small stuff, like one-liners, are written and tested in
XTerm. I guess I'd have to endorse ActiveState since they are a local
company and they let us hold our PM[1] meetings there. :-)


[1]http://vancouver.pm.org/

John
--
use Perl;
program
fulfillment