![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Alternative for a while read line loop | kabs | UNIX for Dummies Questions & Answers | 2 | 04-01-2008 12:25 PM |
| while read loop w/ a nested if statement - doesn't treat each entry individually | littlefrog | Shell Programming and Scripting | 7 | 12-11-2007 09:49 PM |
| Variable in While Loop Nested If | geass | Shell Programming and Scripting | 6 | 03-26-2007 06:09 PM |
| nested loop | chinog | Shell Programming and Scripting | 5 | 04-20-2005 10:45 AM |
| nested read | TioTony | Shell Programming and Scripting | 2 | 03-05-2004 03:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Code:
while read line
do
empl_id=`echo $line | awk ' { print $1; } '`
empl_dir=`echo $line | awk ' { print $2; } '`
done < output_file.txt
The done < output_file.txt thing is another way to read a file. |
|
|||||
|
Sorry for the short info
: im using the ksh on a sun/solaris and the input data is as following:To describe the input data is quite complicated, but in a nutshell : I have a a flat-ascii file which contains directory-names. This file I want to read and with every red file, I'm reading the directories on an ftp-site. Then conditionally, after executing an Oracle-database package another text file is written (by this package). This is also a flat file with every line containing a path-name and jpg-filename. In the second read I have to create the path and copy the jpg-file. I hope its a little more clear now. The sollution of Jim is perfect, but I was just curious if I could make a nested while loop reading files... Thanx for your replies and greetings, Rakker |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|