Re: Extract lines from text file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wednesday 15 August 2012 20:53:33 m.roth@xxxxxxxxx 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 <tony.molloy@xxxxx>
> >
> > 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 anything grep would do and
> >> might be even more useful if you want substitutions for
> >> subsequent use. And of course perl can do anything sed can do,
> >> and then some...
> >
> > True true, and of course C could do anything and everything ;-)
> >
> > But all I need is a simple script which will be run once a year
> > to remove the graduated students from the password file.
> 
> Ah, but are you sure they're not just dropped out for a term, or
>  about to become indentured servants, er, grad students? In that
>  case, maybe just change their login shell to /bin/noLogin
> 
>       mark
> 

No these are 4th year graduated students. If they stay on as post 
graduate students they have to re-register. So clean them out I say 
;-)

Tony
> 
> 
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
> 
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux