I would like to enter multiple lines of values for 3 different variables.
For example, lets say I have $a, $b, and $c in a line like:
ADD $a in $b to get $C
My input will be in rows for all 3 variables :
I know how to do for just a variable but I'm stuck for more than that:
cat > a_list;for a in `cat a_list`; do echo "ADD \""$a"\";"; done
My example output should be as below:
ADD apple in duck to get 11
ADD orange in cat to get 22
ADD pineapple in dog to get 33
ADD xx in bb to get 44
ADD abc in def to get 55
My input would be as below:
apple
orange
pineapple
xx
abc
duck
cat
dog
bb
def
11
22
33
44
55
Is this doable? or are there other ways to achieve the output?
$awhich means my output would have been something like below:ADD apple <br/> ADD orange <br/> ADD pineapple <br/> ADD xx <br/> ADD abc<br/>echo $0in the terminal and tell us what it prints.bashfor l in `cat a_list`; do echo "ADD \"$a\" in \"$b\" to get \"$c\";"; donedo what you want?