Check that user supplied the required argument; and if not, show usage().

Obtained from:	OpenBSD
This commit is contained in:
David E. O'Brien 1999-07-29 09:47:33 +00:00
parent e7bd01e5df
commit 6db03527ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49212

View File

@ -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