![]() |
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 |
| comparing 2 files using nested for loop | vadharah | Shell Programming and Scripting | 0 | 03-01-2008 04:32 AM |
| Nested loop not running using cronjob | bihani4u | Shell Programming and Scripting | 9 | 09-26-2007 12:19 PM |
| Variable in While Loop Nested If | geass | Shell Programming and Scripting | 6 | 03-26-2007 07:09 PM |
| Nested while read line loop | Rakker | Shell Programming and Scripting | 7 | 06-24-2005 08:42 AM |
| nested loop | chinog | Shell Programming and Scripting | 5 | 04-20-2005 11:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
nested loop problem
Please see the following script.
basic="a b c" advance="d e f" A="basic advance" for g in $A do echo $g done The result would be obviously basic advance I want to ask how can i get the following result using $A in for loop a b c d e f |
|
||||
|
Thanks for reply!
The problem is that The following statement has already been defined in a file and i cannot change it. A="basic advance" To change it into your style, i would do A=`echo $A | sed -e s/' '/'} \${'/g` A="\${${A}" but when i run echo $A i get: ${basic} ${advance} which is not the desired result |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|