BASH for-each loop
Published on 31 Mar 2020
I always have to look this one up:
for i in *.tar.xz; do tar xfv $i; done
Or multiline:
for i in *.tar.xz
do tar xfv $i
done
For tar:
| switch | function |
|---|---|
| -x | extract |
| -f | file |
| -v | verbose |