![]() |
|
|
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 |
| foreach loop + 2 variables | JamesGoh | Shell Programming and Scripting | 3 | 06-04-2008 04:36 AM |
| While loop with Multiple variables | amit1_x | Shell Programming and Scripting | 4 | 04-02-2008 07:35 AM |
| using variables outside a while loop | Tornado | Shell Programming and Scripting | 2 | 02-09-2007 01:26 AM |
| adding variables for, for loop | jazz | High Level Programming | 3 | 03-13-2006 04:23 AM |
| Writing to variables within a loop | Sniper Pixie | UNIX for Dummies Questions & Answers | 0 | 03-02-2006 09:11 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
for loop with multiple variables ?
I have a script which selects two 'sets' of system LVM device files from a tabular file 'mapfile' using awk :
LIVELV=`awk '{print($1)}' mapfile` BCVLV=`awk '{print($3)}' mapfile` I wanted to pass these 'sets' into an LVM command 'loop' along the lines of : lvmerge $BCVLV $LIVELV ie. for each device file in column 1 of the file 'mapfile' merge in the device in column 3 of the same line. I have messed about for hours with a for loop but I don't think this will handle the two different sets of variables in the same statement ? I am probably approaching this from completely the wrong angle. Any advice would be gratefully received - scripting isn't my strong suit - but god knows I'm trying ! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|