![]() |
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 |
| How to read/process a .gz file, one line at a time? | dayscripter | Shell Programming and Scripting | 2 | 10-16-2008 06:26 AM |
| Post Shell programming: Question about source a file and read data from the file | ccwq | Shell Programming and Scripting | 3 | 08-04-2007 10:28 PM |
| read file and output message | happyv | Shell Programming and Scripting | 12 | 01-24-2007 09:57 PM |
| Opening output file while still in process | monkfan | UNIX for Dummies Questions & Answers | 4 | 03-02-2006 04:35 AM |
| store output to a file and read from it | afadaghi | Shell Programming and Scripting | 2 | 10-04-2005 12:00 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Read from file > process > output to file
Hi all,
OK, I am totally new to shell scripting as I just started today. All I want from shell scripting is something very basic, and I've been searching for tutorials on "processing files" and I could not find a suitable one for my level. I want to read two columns from a data file, one raw at a time, use these values as input to some program, then parse the output of that program (output is text) and append important info to another file I am going insane about this, please help me find a useful tutorial!!! Thanks |
|
||||
|
This is a very "first time question"
![]() The basic concept should be: Code:
while read col1 col2 do echo $col1 >> output.file echo $col2 >> output.file done < data.file |
|
||||
|
Quote:
Code:
while read col1 col2 do echo $col1 echo $col2 done < data.file >> output.file |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|