POSIX Shell Programming Challenge - Programming On Unix

Users browsing this thread: 1 Guest(s)
movq
Long time nixers
(12-04-2021, 02:35 PM)mort Wrote: I don't know whether this is technically correct according to POSIX or not, but it doesn't work in ZSH. In ZSH, "test/.*" is an error if there are no hidden files in the directory, and "test/*" is an error if there are no non-hidden files in the directory.

POSIX says:
Quote:If the pattern does not match any existing filenames or pathnames, the pattern string shall be left unchanged.

So I guess it’s fine. :)

(I wish POSIX would demand Bash’s “nullglob” option. That’s what I want 99.999999% of the time.)


Messages In This Thread
POSIX Shell Programming Challenge - by mort - 12-04-2021, 10:36 AM
RE: POSIX Shell Programming Challenge - by movq - 12-04-2021, 10:49 AM
RE: POSIX Shell Programming Challenge - by s0kx - 12-04-2021, 11:47 AM
RE: POSIX Shell Programming Challenge - by s0kx - 12-04-2021, 01:31 PM
RE: POSIX Shell Programming Challenge - by jkl - 12-04-2021, 01:34 PM
RE: POSIX Shell Programming Challenge - by sth - 12-04-2021, 01:36 PM
RE: POSIX Shell Programming Challenge - by mort - 12-04-2021, 01:52 PM
RE: POSIX Shell Programming Challenge - by mort - 12-04-2021, 02:35 PM
RE: POSIX Shell Programming Challenge - by movq - 13-04-2021, 03:34 PM
RE: POSIX Shell Programming Challenge - by s0kx - 16-04-2021, 02:50 AM
RE: POSIX Shell Programming Challenge - by s0kx - 01-05-2021, 04:56 AM