![]() |
|
|
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 |
| loop through variable | finalight | Shell Programming and Scripting | 0 | 05-20-2008 11:30 PM |
| getting values from variable in a loop | kriuz | Shell Programming and Scripting | 3 | 01-22-2008 05:50 PM |
| pass a variable to sed p in a loop? | JohnMario | Shell Programming and Scripting | 7 | 01-02-2008 05:13 PM |
| Variable in While Loop Nested If | geass | Shell Programming and Scripting | 6 | 03-26-2007 07:09 PM |
| variable not found with loop? | douknownam | Shell Programming and Scripting | 2 | 09-27-2004 11:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi...
i am trying to ping my servers .The hostnames are present in a file .They are separated by spaces in the file . i am doing the following : a=1 for name in $(cat host2 |cut -d" " -f$a) do echo Pinging server $name ping -c5 $name a=$a+1 done It is working with the first name .But after that it stops.The for loop is not taking the next names . Pls suggest . Last edited by sars; 11-28-2006 at 05:59 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|