summaryrefslogtreecommitdiff
path: root/m4n.sh
diff options
context:
space:
mode:
Diffstat (limited to 'm4n.sh')
-rw-r--r--m4n.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/m4n.sh b/m4n.sh
index 989adce..8e70b9e 100644
--- a/m4n.sh
+++ b/m4n.sh
@@ -24,13 +24,12 @@ main() {
shift $((OPTIND - 1))
- if [ $# -eq 0 ]; then
- $om4 - | m4
+ if [ $# -lt 1 ]; then
+ die 'missing operand\n'
+ elif [ $# -gt 1 ]; then
+ die 'too many operands\n'
else
- while [ $# -gt 0 ]; do
- $om4 $1 | m4
- shift
- done
+ $om4 $1 | m4
fi
}