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

Re: [SLUG] Script needed



On Thu, 1 Jun 2000, Matthew Dalton wrote:

> Anthony Rumble wrote:
> > 
> > On 1 Jun 2000, Herbert Xu wrote:
> > 
> > > Simon Bryan <sbryan@nospam.olmc.nsw.edu.au> wrote:
> > > > I have a file of:
> > > > username:password
> > >
> > > > I want to be able to regularly generate a file from this of just the usernames,
> > >
> > > cut -d : -f 1
> > 
> > Proving yet again.. theres always at least 15 ways of skining a cat on
> > Unix :)
> 
> Yep...
> 
> $ cat input | sed -e 's/:.*//' > output

And if you're short of cats:

$ sed -e 's/:.*//' < input > output


- James
--
James Morris
<jmorris@nospam.intercode.com.au>


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text