![]() |
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 |
| For Loop with Strings as parameters | kadishmj | Shell Programming and Scripting | 6 | 10-06-2008 03:57 AM |
| Urgent:Comparing two Strings using If Loop | Anji | Shell Programming and Scripting | 2 | 01-09-2008 08:54 AM |
| ls while read loop - internal read picking up wrong input | dkieran | Shell Programming and Scripting | 2 | 05-14-2007 03:02 PM |
| While read loop and rsh | 104234 | UNIX for Advanced & Expert Users | 1 | 01-15-2006 11:53 AM |
| read inside a while loop | dta4316 | UNIX for Dummies Questions & Answers | 3 | 05-21-2005 10:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
SOLVED: Read from a file and use the strings in a loop
Hello all,
I need some help to create a script which contain a few strings on every line, and use those strings in a loop to fire some commands. for exmaple the file looks like tom dave bill andy paul I want to read one line at a time and use it in loop like command tom command dave ...... ...... and ignore the last line which will always be empty. Thanks for your help. Last edited by xboxer21; 04-14-2006 at 01:42 PM.. Reason: SOLVED |
|
||||
|
Solved
Quote:
Worked very well. |
|
||||
|
You can type this right on the command line too. Now script needed.
for i in $(cat file) do command $i done -X |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|