Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Combine two lists of variables

$
0
0
Thanks in advance for any advice and help.

I have two lists of variables that I want to put into nested for loops.

Code:

for x in 1 2 3
do
for y in a b c
do

The output I want is:
Code:

filepath/1/ command modified by a
filepath/2/ command modified by b
filepath/3/ command modified by c

To be clear, I do NOT want 1a, 1b, 1c, 2a, 2b, 2c, etc. I want 1 to match with a, 2 with b and 3 with c.

Thanks you and sorry if anything is not clear.

Viewing all articles
Browse latest Browse all 16232

Trending Articles