Need script help.

Jeffrey McCright jmccright at hotmail.com
Thu Jun 21 16:43:43 CDT 2007


Thanks, I will pass this along.



Jeffrey A. McCright, A+
816-210-3107
jmccright at hotmail.com





>From: djgoku <djgoku at gmail.com>
>To: kclug at kclug.org
>Subject: Re: Need script help.
>Date: Thu, 21 Jun 2007 11:39:13 -0500

>
>On 6/21/07, Jeffrey McCright <jmccright at hotmail.com> wrote:
> > All,
> >
> > I have a friend who needs to run a shell script to process data in a 
>space
> > or comma delimited file. I think SED or AWK may be needed here, but I 
>don't
> > program so I need help. The ASCII File structure is similar to the
> > following:
> >
> > Lastname Firstname internalphonenumber externalphonenumber 
>phoneextention
> > MACaddress ...
> > Lastname Firstname internalphonenumber externalphonenumber 
>phoneextention
> > MACaddress ...
> > Lastname Firstname internalphonenumber externalphonenumber 
>phoneextention
> > MACaddress ...
> > Lastname Firstname internalphonenumber externalphonenumber 
>phoneextention
> > MACaddress ...
> >
> > The fields are variable length.
> >
> > My friend needs to be able to plug in commands in this script file so 
>that
> > she can have something like:
> >
> >
> > {command} Lastname {command} Firstname {command} internalphonenumber
> > {command} externalphonenumber ...
>
>test is the file with this data:
>Lastname Firstname internalphonenumber externalphonenumber
>phoneextention MACaddress
>
>Also replace command with the command of your choice.
>
># space delimited
>$ perl -n -e 'chomp; (@data) = split / /; system "command", @data;' test
>
># comma delimited
>$ perl -n -e 'chomp; (@data) = split /,/; system "command", @data;' test
>_______________________________________________
>Kclug mailing list
>Kclug at kclug.org
>http://kclug.org/mailman/listinfo/kclug

_________________________________________________________________
Hotmail to go? Get your Hotmail, news, sports and much more! 
http://mobile.msn.com



More information about the Kclug mailing list