Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ~ls



-> Other neat expandos:

Simon, 

What was the shell you've used? I have found no shell in which _all_ 
of your examples have worked... I thought it might be zsh, but:
/tmp/TT $ ls ^[012]*
zsh: no matches found: ^[012]*

Here's just 2 of them:

bash:
-> % ls 1[234]*  
-> % ls {12,14}*
-> % ls {18..21}*   # ( or <18-21>* ) *NO*
-> % ls ^[012]*     # *NO*
-> % ls *mp3~[012]* # *NO*

tcsh:
-> % ls 1[234]* 
-> % ls {12,14}*
-> % ls {18..21}*   # ( or <18-21>* ) *NO*
-> % ls ^[012]*     # *NO* ( as far as I can tell this works only in tcsh)
-> % ls *mp3~[012]* # *NO*

Especially about <18-21>* pattern: most shells (actually, all -- but zsh
-- of which I have used) treat this as: take STDIN from file "18-21",
put STDOUT into whatever is * expanded to.

tcsh:
$ ls <18-21>*
18-21: No such file or directory.

I did try all of /bin/*sh ;) on Linux and csh,sh on Solaris (on 
Linux csh is just a link to tcsh, and /bin/sh -> bash ;(((

--Dmytro




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links