Suppose I have some output from a command (such as ls -1
):
a
b
c
d
e
...
I want to apply a command (say echo
) to each one, in turn. E.g.
echo a
echo b
echo c
echo d
echo e
...
What's the easiest way to do that in bash?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…