We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 016e81d commit 34f62beCopy full SHA for 34f62be
sql/files/defaultdata/awk/run
@@ -13,7 +13,12 @@ DEST="$1" ; shift
13
MEMLIMIT="$1" ; shift
14
MAINSOURCE="$1"
15
16
-# There is no portable way to test the syntax of an awk script.
+# Syntax check based on: https://stackoverflow.com/a/7212314
17
+for j in "$@" ; do
18
+ awk -f $j -- 'BEGIN { exit(0) } END { exit(0) }'
19
+ EXITCODE=$?
20
+ [ "$EXITCODE" -ne 0 ] && exit $EXITCODE
21
+done
22
23
# We construct here the list of source files to be passed to awk:
24
FILEARGS=''
0 commit comments