I've been living fat dumb and happy, using Bourne Shell, and under
IRIX for the past 10 years or so.
Now, I'm having to migrate shell scripts to Fedora Linux, and have run
into a problem.
In several places I have used the test command to test for readable
file existence in a directory, and if readable files are there,
continue processing, else stop, reporting the empty directory to the
[ -r [1-9]* ] || echo "No files in the upload directory"
[ -r * ] || echo "No files in transfer directory"
[ -r [1-9]* ] && cp [1-9]* /$ARTICLES
Under IRIX, this works properly. Under Bash/Linux coreutils test
command, it bombs out with completely unwanted extra help, without
providing a result.
How would I test one or more readable files in a directory under Bash,
using the standard test operator. I can work with having to backslash
the internal brackets, but not the extra *from a command that is
supposed to return a boolean result.
Right now, I'm a little too pissed off to see the simple solution, or
workaround to how I think the world should be. Naturally, this is