Re: [CentOS] Extract lines from text file

2012-08-16 Thread wwp
Hello m.r...@5-cent.us, On Wed, 15 Aug 2012 11:47:21 -0400 m.r...@5-cent.us wrote: > wwp wrote: > > On Wed, 15 Aug 2012 15:22:10 +0100 Tony Molloy wrote: > >> > >> I'm looking for a command to extract lines from a large text file, a > >> password file. A typical user has a username made from a

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Tony Molloy
On Wednesday 15 August 2012 20:53:33 m.r...@5-cent.us wrote: > Tony Molloy wrote: > > On Wednesday 15 August 2012 19:46:42 Les Mikesell wrote: > >> On Wed, Aug 15, 2012 at 1:26 PM, Tony Molloy > > > > wrote: > >> >> ]$ cat testcentoslist | egrep ^m.*:.*:.*:850: > >> >> m9718308:pw:9301:850: Lynch

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Mark LaPierre
On 08/15/2012 10:22 AM, Tony Molloy wrote: > > Hi, > > I'm looking for a command to extract lines from a large text file, a > password file. A typical user has a username made from a letter > followed by their id-number. > > m9718508:pw:9301:840: Lynch :/home/pgstud/m9718508:/bin/bash > > So for i

Re: [CentOS] Extract lines from text file

2012-08-15 Thread m . roth
Tony Molloy wrote: > On Wednesday 15 August 2012 19:46:42 Les Mikesell wrote: >> On Wed, Aug 15, 2012 at 1:26 PM, Tony Molloy > wrote: >> >> ]$ cat testcentoslist | egrep ^m.*:.*:.*:850: >> >> m9718308:pw:9301:850: Lynch :/home/pgstud/m9718508:/bin/bash >> > >> > Exactly what I needed. I'll just

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Tony Molloy
On Wednesday 15 August 2012 19:46:42 Les Mikesell wrote: > On Wed, Aug 15, 2012 at 1:26 PM, Tony Molloy wrote: > >> ]$ cat testcentoslist | egrep ^m.*:.*:.*:850: > >> m9718308:pw:9301:850: Lynch :/home/pgstud/m9718508:/bin/bash > > > > Exactly what I needed. I'll just drop the cat as a later pos

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Les Mikesell
On Wed, Aug 15, 2012 at 1:26 PM, Tony Molloy wrote: >>> >> ]$ cat testcentoslist | egrep ^m.*:.*:.*:850: >> m9718308:pw:9301:850: Lynch :/home/pgstud/m9718508:/bin/bash >> > > Exactly what I needed. I'll just drop the cat as a later poster > pointed out. > sed -n -e '/pattern/p' can match anythi

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Tony Molloy
On Wednesday 15 August 2012 15:36:09 Marcelo Beckmann wrote: > Em 15-08-2012 11:22, Tony Molloy escreveu: > > Hi, > > > > I'm looking for a command to extract lines from a large text > > file, a password file. A typical user has a username made from a > > letter followed by their id-number. > > > >

Re: [CentOS] Extract lines from text file

2012-08-15 Thread m . roth
Tilman Schmidt wrote: > Am 15.08.2012 16:36, schrieb Marcelo Beckmann: >> Em 15-08-2012 11:22, Tony Molloy escreveu: > [...] >>> cat passwdfile | grep ^m | grep 850 > output > [...] >> ]$ cat testcentoslist | egrep ^m.*:.*:.*:850: > > http://en.wikipedia.org/wiki/Cat_%28Unix%29#Useless_use_of_cat >

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Tilman Schmidt
Am 15.08.2012 16:36, schrieb Marcelo Beckmann: > Em 15-08-2012 11:22, Tony Molloy escreveu: [...] >> cat passwdfile | grep ^m | grep 850 > output [...] > ]$ cat testcentoslist | egrep ^m.*:.*:.*:850: http://en.wikipedia.org/wiki/Cat_%28Unix%29#Useless_use_of_cat Because a cat is a terrible thing

Re: [CentOS] Extract lines from text file

2012-08-15 Thread m . roth
Tony Mountifield wrote: > In article <81eb30fb297893749f5c1e211f08c7e4.squir...@mail.5-cent.us>, > wrote: >> wwp wrote: >> > On Wed, 15 Aug 2012 15:22:10 +0100 Tony Molloy >> wrote: >> >> >> >> I'm looking for a command to extract lines from a large text file, a >> >> password file. A typical us

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Tony Mountifield
In article <81eb30fb297893749f5c1e211f08c7e4.squir...@mail.5-cent.us>, wrote: > wwp wrote: > > On Wed, 15 Aug 2012 15:22:10 +0100 Tony Molloy wrote: > >> > >> I'm looking for a command to extract lines from a large text file, a > >> password file. A typical user has a username made from a letter

Re: [CentOS] Extract lines from text file

2012-08-15 Thread m . roth
wwp wrote: > On Wed, 15 Aug 2012 15:22:10 +0100 Tony Molloy wrote: >> >> I'm looking for a command to extract lines from a large text file, a >> password file. A typical user has a username made from a letter >> followed by their id-number. >> >> m9718508:pw:9301:840: Lynch :/home/pgstud/m9718508

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Marcelo Beckmann
Em 15-08-2012 11:22, Tony Molloy escreveu: > > Hi, > > I'm looking for a command to extract lines from a large text file, a > password file. A typical user has a username made from a letter > followed by their id-number. > > m9718508:pw:9301:840: Lynch :/home/pgstud/m9718508:/bin/bash > > So

Re: [CentOS] Extract lines from text file

2012-08-15 Thread wwp
Hello Tony, On Wed, 15 Aug 2012 15:22:10 +0100 Tony Molloy wrote: > > Hi, > > I'm looking for a command to extract lines from a large text file, a > password file. A typical user has a username made from a letter > followed by their id-number. > > m9718508:pw:9301:840: Lynch :/home/pgstud

Re: [CentOS] Extract lines from text file

2012-08-15 Thread Rajagopal Swaminathan
Greetings, On Wed, Aug 15, 2012 at 7:52 PM, Tony Molloy wrote: > > Hi, > > > So for instance if I need to extract lines where; > > the 1st field, the username begins with an m > and > the 4th field, the group contains exactly 850 > cut -d: -f1,4 -- Regards, Rajagopal

[CentOS] Extract lines from text file

2012-08-15 Thread Tony Molloy
Hi, I'm looking for a command to extract lines from a large text file, a password file. A typical user has a username made from a letter followed by their id-number. m9718508:pw:9301:840: Lynch :/home/pgstud/m9718508:/bin/bash So for instance if I need to extract lines where; the 1st field,