David, et al -- ...and then David Haller said... % % Hello, Hiya! % % On Mon, 15 Mar 2021, David T-G wrote: % [..] % >Hmmmm ... Do char classes work for ls for you? Not for me on Leap 15.2: % > ... % > diskfarm:/tmp/X # ls -la .[:alnum:] % > ls: cannot access '.[:alnum:]': No such file or directory % % Simple: you botched it! *hrhr* ;) % % The argument '.[:alnum:]*' does not contain a char-class, but % specifies, that any of the characters 'a', 'l', ':', 'n', 'u' or 'm' % should follow the leading '.', followed by anything (per the '*'). Exactly. Well, note that I didn't put a splat at the end of mine, but I get it. % % RTFM: man 7 glob, cf. man 7 regex. % % Correct is: 'ls -la .[[:alnum:]]*' OH!!!! % ... % $ ls -Al .[^.[:alpha:]]* % -rw-r--r-- 1 dh dh 0 Mar 16 01:22 .1 [snip] HOLY SMOKES! I love it when I learn something :-) :-) :-) diskfarm:/tmp/X # ls -la total 4 drwxr-xr-x 2 root root 65 Mar 15 22:31 . -rw-r--r-- 1 root root 0 Mar 15 22:27 '. ' drwxrwxrwt 14 root root 4096 Mar 16 01:00 .. -rw-r--r-- 1 root root 0 Mar 15 22:27 .abc -rw-r--r-- 1 root root 0 Mar 15 22:27 .x -rw-r--r-- 1 root root 0 Mar 15 22:31 B -rw-r--r-- 1 root root 0 Mar 15 22:31 a -rw-r--r-- 1 root root 0 Mar 15 22:31 c diskfarm:/tmp/X # ls -la .[[:alnum:]] -rw-r--r-- 1 root root 0 Mar 15 22:27 .x diskfarm:/tmp/X # ls -la .[^.] -rw-r--r-- 1 root root 0 Mar 15 22:27 '. ' -rw-r--r-- 1 root root 0 Mar 15 22:27 .x diskfarm:/tmp/X # ls -la .??* .[^.] -rw-r--r-- 1 root root 0 Mar 15 22:27 '. ' -rw-r--r-- 1 root root 0 Mar 15 22:27 .abc -rw-r--r-- 1 root root 0 Mar 15 22:27 .x Thanks!!! :-) Given that my time on HP-UX (ew), AIX (ew-ew), and SunOS ("These are the good old days ...") is pretty slim now that I'm a flight instructor, I just might be able to make myself depend on the handy GNU extensions beyond plain vanilla. This is a lovely one. HANN :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt