I came across an interesting article on wildcards in shell:
http://www.defensecode.com/public/DefenseCode_Unix_WildCards_Gone_Wild.txt


Tested some of the above in pdksh on a current OpenBSD-host:
$ mkdir test
$ cd test
$ touch file1 file2 file3 "-rf"
$ mkdir DIR1 DIR2              
$ ls -al
total 16
-rw-r--r--   1 sturban  sturban     0 Sep 10 04:26 -rf
drwxr-xr-x   4 sturban  sturban   512 Sep 10 04:26 ./
drwxr-xr-x  10 sturban  sturban  1024 Sep 10 04:25 ../
drwxr-xr-x   2 sturban  sturban   512 Sep 10 04:26 DIR1/
drwxr-xr-x   2 sturban  sturban   512 Sep 10 04:26 DIR2/
-rw-r--r--   1 sturban  sturban     0 Sep 10 04:26 file1
-rw-r--r--   1 sturban  sturban     0 Sep 10 04:26 file2
-rw-r--r--   1 sturban  sturban     0 Sep 10 04:26 file3
$ rm *
$ ls -al 
total 8
-rw-r--r--   1 sturban  sturban     0 Sep 10 04:26 -rf
drwxr-xr-x   2 sturban  sturban   512 Sep 10 04:26 ./
drwxr-xr-x  10 sturban  sturban  1024 Sep 10 04:25 ../

Reply via email to