[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SLUG] Script needed
On Thu, 1 Jun 2000, Simon Bryan wrote:
> I am looking for some kind script wizard to help me out.
> I have a file of:
> username:password
>
> I want to be able to regularly generate a file from this of just the usernames,
> that is strip off the ':password'. Could some kind person pointme at the Perl
> (or other commands) to do this?
This is a job for.. <tada> AWK.
cat thefile.txt | awk -F: '{print $1}'
Done.. easy..
---
Anthony Rumble
LinuxHelp http://www.LinuxHelp.com.au Phone: 0500 500 368
Direct 02-9712-1799 Mobile 0412-955-042 Fax 02-9712-3977
--
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