![]() |
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 |
| Script required to get a required info from file. Pls. help me. | ntgobinath | Shell Programming and Scripting | 2 | 05-31-2008 08:34 AM |
| how can i put the condition in for loop for the below. | mail2sant | Shell Programming and Scripting | 1 | 04-28-2008 04:49 AM |
| Testing For Loop condition | mavsman | UNIX for Dummies Questions & Answers | 4 | 04-01-2008 11:45 AM |
| Checking condition inside the loop | ithirak17 | Shell Programming and Scripting | 1 | 03-13-2008 08:37 AM |
| What condition to be put in the while loop? | nehaquick | UNIX for Dummies Questions & Answers | 1 | 02-15-2008 04:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
End of loop condition required???
Hi
i have a variable with lots of tokens seperated with spaces. e.g VAR="ABC DEF GHSD GHQS TUTSD JHDTQ QDHQ CDQKDGQ WQUTQD DQUTQD DQJGDQ QDTQD WDQUTQDU QDUGQD QDJGQD DQUTDUQ QDUIDTQ" i want to separate all of the above tokens and call a script with each of the token e.g sh script.sh <TOKEN> Can anybody provide the logic script ? I am cofused about the end of the loop condition. Thanks |
|
||||
|
#!/user/bin
NAMES=`ls *.txt` echo $NAMES The content of this NAMES variable are TOKENS seperated by spaces. i want to pass each token to another script called run.sh as follows: while [<ALL tokens in $NAMES one by one>] do sh run.sh <TOKEN> done please provide the logic for seperating NAMES token and then calling run.sg with each token ???? |
|
||||
|
Thanks.
Its working !!! |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|