Re: General UNIX puzzle

2004-01-17 Thread Chris Pressey
On Sat, 17 Jan 2004 14:50:18 -0700 Brett Glass <[EMAIL PROTECTED]> wrote: > For example, while I received answers involving languages, such as > sed and awk, the simplest answer to at least one of them seems to use > grep. How so? My first thought for #3 was 'fgrep -v string', but on re-reading

Re: General UNIX puzzle

2004-01-17 Thread Bill Campbell
On Sat, Jan 17, 2004, Brett Glass wrote: >At 02:44 PM 1/17/2004, Eric Anderson wrote: > >>You should do your own Comp Sci homework. This looks like (especially considering >>the time of th year) the begining of a Unix Basics course. > >Nope; I'm quite experienced with UNIX. However, I posted the >

Re: General UNIX puzzle

2004-01-17 Thread Brett Glass
At 02:44 PM 1/17/2004, Eric Anderson wrote: >You should do your own Comp Sci homework. This looks like (especially considering the >time of th year) the begining of a Unix Basics course. Nope; I'm quite experienced with UNIX. However, I posted the question because I wanted to see what the most e

Re: General UNIX puzzle

2004-01-17 Thread Eric Anderson
1) Delete the Nth line from a text file? 2) Insert a specified line in a file after the Nth line, leaving the rest of the text the same? 3) Delete the first line containing a particular string? 4) Insert a specified line after the first line containing a particular string, leaving the rest of th

Re: General UNIX puzzle

2004-01-16 Thread Bill Campbell
On Fri, Jan 16, 2004, Brett Glass wrote: >I was asked a good question today about how to do some simple tasks using >standard UNIX tools, and am curious what answers people on the list might >come up with. > >What are the simplest, most efficient ways to: > >1) Delete the Nth line from a text fil

Re: General UNIX puzzle

2004-01-16 Thread Jean-Marc Zucconi
> Brett Glass writes: > I was asked a good question today about how to do some simple tasks using > standard UNIX tools, and am curious what answers people on the list might > come up with. > What are the simplest, most efficient ways to: > 1) Delete the Nth line from a text file? se

Re: General UNIX puzzle

2004-01-16 Thread Rob
Brett Glass asked on Saturday January 17, 2004: > I was asked a good question today about how to do some simple tasks using > standard UNIX tools, and am curious what answers people on the list might > come up with. > > What are the simplest, most efficient ways to: > > 1) Delete the Nth line fro

General UNIX puzzle

2004-01-16 Thread Brett Glass
I was asked a good question today about how to do some simple tasks using standard UNIX tools, and am curious what answers people on the list might come up with. What are the simplest, most efficient ways to: 1) Delete the Nth line from a text file? 2) Insert a specified line in a file after th