|
Try:
tr ' ' '\n' <file |sed "s/^/$CMND /" | sh
The above pipe-lined command will put $CMND (i.e. whatever is in CMND variable) before each word as one per line and then will execute all of them, again in sequence.
I hope this is what you wanted to do.
|