Skip to content

Commit b7bec4b

Browse files
authored
Merge pull request #1503 from jsteyn/patch-1
Update file existence checks in goostats.sh
2 parents 4f0a496 + 00afc99 commit b7bec4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shell-lesson-data/north-pacific-gyre/goostats.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ then
1111
fi
1212

1313
# check if files already exist (good for $1, bad for $2)
14-
if [ ! -a "$1" ]
14+
if [ ! -f "$1" ]
1515
then
1616
echo "error reading input: $1"
1717
exit 2
18-
elif [ -a "$2" ]
18+
elif [ -f "$2" ]
1919
then
2020
echo "error writing result: $2"
2121
exit 2

0 commit comments

Comments
 (0)