-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
The following happens in macOS Sequoia 15.6.1:
bash-5.1$ bash goostats.sh NENE01729A.txt stats-NENE01729A.txt
error reading input: NENE01729A.txt
I have traced this to the recently merged #1487 by @tkphd. The fix that works for me is to change from -a to -e or -f in
if [ ! -a "$1" ]
then
echo "error reading input: $1"
exit 2
elif [ -a "$2" ]
...
On this mac, bash man pages say that both -e and -a are True if file exists, and -f is True if file exists and is a regular file. Are there any specific reasons why -a was used and not, say, -f or -e?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels