thank you for taking time to help!
I'm trying to run a command 1 time with a variable as the argument. The thing is, the variable has multiple lines, and I need to run a command 1 time for each line as the argument.
Example script
VAR1=command1
"${VAR1}" | xargs -L1 -d "\n command2$i
The example output for VAR1 is
1111
2222
3333
4444
5555
I need to run command2 one time per line, so
command2 1111
command2 2222
command2 3333
command2 4444
command2 5555
I have tried this as well,
VAR1=command1
"${VAR1}" | while read line ; do command2$i
and this
VAR1=command1
"${VAR1}" | while read line ; do command2"${VAR1}"
Thank you for yalls time!