I have a command that generates an output of a list: - can be multiples lines or only one...)
I have to assign each of these outputs into variables:
And so on until the last one...
Im not an expert in shell so the only way I know how to do it is using sed (that will run the command multiple times...)
So, is there a way that:
1- Create a loop that will through every line assigning it to variables (even if it 5 or 10 lines as output)? - running the main command only one time...
2- If no lines are available an error message is sent...