From: Oleg Broytman Date: Thu, 15 Aug 2019 18:54:59 +0000 (+0300) Subject: Refactor: Use `$#` to check parameters X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=082bcece9ab1c60b169cd09160d19adb0bced630;p=cookiecutter.git Refactor: Use `$#` to check parameters --- diff --git a/mk-project b/mk-project index 4674ef0..eecfa53 100755 --- a/mk-project +++ b/mk-project @@ -1,6 +1,6 @@ #! /bin/sh -if [ -z "$1" -o -n "$2" ]; then +if [ $# -ne 1 ]; then echo "Usage: $0 project_name" >&2 exit 1 fi diff --git a/move-project b/move-project index 72f7475..2e7dba1 100755 --- a/move-project +++ b/move-project @@ -1,6 +1,6 @@ #! /bin/sh -if [ -z "$1" -o -n "$2" ]; then +if [ $# -ne 1 ]; then echo "Usage: $0 project_name" >&2 exit 1 fi