Why sh?
Hm. One could have figured that 30 years earlier...Because csh has several limitations and unintuitive behavior.
# mkdir -p /tmp/test{1,2,3}
# ls /tmp | grep test
test1
test2
test3
# ???
for d in 1 2 3; do mkdir -p /tmp/test${d}; done
. dice@fbsd-test:~ % sh
$ for d in 1 2 3; do mkdir -p /tmp/test${d}; done
$ ls -ld /tmp/test*
drwxr-xr-x 2 dice wheel 2 Dec 13 14:58 /tmp/test1
drwxr-xr-x 2 dice wheel 2 Dec 13 14:58 /tmp/test2
drwxr-xr-x 2 dice wheel 2 Dec 13 14:58 /tmp/test3
Hi guys,
In my manuals when installing I usually use commands similar to this a lot:
CSH (FreeBSD <= 10.2) example:
# mkdir -p /tmp/test{1,2,3}
# ls /tmp | grep test
Code:test1 test2 test3
Is there a way to do this same thing with SH?
SH (FreeBSD >= 14.0) example:
# ???
Thank you for your answers!
ksh knows toozsh is a feature-rich sh variant that knows these tricks. Note that it isn't fully compatible with sh scripts, but for interactive use it is close enough.