loop question
- From: Jeff Hyman <scolist@xxxxxxxxxx>
- Date: Thu, 27 Dec 2007 16:46:54 -0500
Hello fellow fellows,
I have a file named "INPUT" that contains thousands of lines. Example:
101001 2345
101002 4359
101003 25459
.... etc...
What Id like to do, is be able to set each line as a variable
in a loop.
Example:
$1 = 101001
$2 = 2345
$1 = 101002
$2 = 4359
$1 = 101003
$2 = 25459
If I can get the variables set as above, I can pass them to
an isql statement for a mass update of a database table.
# while read INPUT
# do
for i in `cat INPUT`
do
echo "i: ${i}"
echo "------- \c" ; read ans
done
# done
Obviously, the loop above echo's each column seperately, and
not as one line... and trying to get the output as a $1/$2
is not working.
Any ideas where I'm going wrong?
TIA,
Jeff H
.
- Follow-Ups:
- Re: loop question
- From: Brian K. White
- Re: loop question
- From: Ronald Marchand
- Re: loop question
- Prev by Date: Re: SCOX Delisted On NASDAQ (Yahoo Busted Link)
- Next by Date: Re: loop question
- Previous by thread: SCOX Delisted On NASDAQ (Yahoo Busted Link)
- Next by thread: Re: loop question
- Index(es):
Relevant Pages
|