Check that user supplied the required argument; and if not, show usage().
Obtained from: OpenBSD
This commit is contained in:
parent
5917e51054
commit
596e3f565c
@ -37,6 +37,11 @@ OLDYACC="yyexca yyact yypact yypgo yyr1 yyr2 yychk yydef"
|
||||
NEWYACC="yylhs yylen yydefred yydgoto yysindex yyrindex yygindex \
|
||||
yytable yycheck"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "usage: $0 file [tables]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
file=$1
|
||||
>$file
|
||||
shift
|
||||
|
Loading…
Reference in New Issue
Block a user