Check that user supplied the required argument; and if not, show usage().
Obtained from: OpenBSD
This commit is contained in:
parent
e7bd01e5df
commit
6db03527ff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49212
@ -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