Shell script
Garrett Goebel
garrett at scriptpro.com
Tue Nov 11 23:39:40 CST 2003
brad wrote:
>
> I have a tab delimited list of usernames and passwords that
> I need to run a set of system commands on. I was thinking
> maybe I could build a for loop and assign the first entry
> on the line as $x and the second entry on the line as $y.
> Is this possible? Or am I going to have to use sed or awk?
Check out:
http://chicago.pm.org/meetings/20031104/command-line-options.pdf
perl -l -n -a -Ft -e 'print "col1: $F[0], col2:$F[1]n"' filename
The above will verbosely print the first 2 columns for every line in
filename.
You could use backticks to call a series of system commands.
--
Garrett Goebel
IS Development Specialist
ScriptPro Direct: 913.403.5261
5828 Reeds Road Main: 913.384.1008
Mission, KS 66202 Fax: 913.384.2180
www.scriptpro.com garrett at scriptpro dot com
More information about the Kclug
mailing list