aboutsummaryrefslogtreecommitdiff
path: root/bin/fnp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/fnp.sh')
-rw-r--r--bin/fnp.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/fnp.sh b/bin/fnp.sh
index bc0c7e21..c5beddc6 100644
--- a/bin/fnp.sh
+++ b/bin/fnp.sh
@@ -1,7 +1,9 @@
# Print input, but include filenames as headings
# Assume stdin if no options given
-[ "$#" -gt 0 ] || set -- -
+if [ "$#" -eq 0 ] ; then
+ set -- -
+fi
# Iterate through arguments
for arg do
@@ -13,7 +15,9 @@ for arg do
*) fn=$arg ;;
esac
- [ -n "$tail" ] && printf '\n'
+ if [ -n "$tail" ] ; then
+ printf '\n'
+ fi
tail=1
# Form the underline; is there a nicer way to do this in POSIX sh?