From 24d8c07c007cd85e3407118e351c82291fa87e37 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 23 Jul 2015 14:49:35 +1200 Subject: More detail for pa() and pan() funcs --- bash/bashrc.d/pa.bash | 2 +- bash/bashrc.d/pan.bash | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'bash') diff --git a/bash/bashrc.d/pa.bash b/bash/bashrc.d/pa.bash index 6c3531f0..3a7b8398 100644 --- a/bash/bashrc.d/pa.bash +++ b/bash/bashrc.d/pa.bash @@ -1,4 +1,4 @@ -# Print arguments +# Print arguments, one per line. Compare pan(). pa() { if (($#)) ; then printf '%s\n' "$@" diff --git a/bash/bashrc.d/pan.bash b/bash/bashrc.d/pan.bash index 14cd3625..97de3917 100644 --- a/bash/bashrc.d/pan.bash +++ b/bash/bashrc.d/pan.bash @@ -1,6 +1,8 @@ # Print arguments, null-delimited; you will probably want to write this into a -# file or as part of a pipeline +# file or as part of a pipeline. Compare pa(). pan() { - printf '%s\0' "$@" + if (($#)) ; then + printf '%s\0' "$@" + fi } -- cgit v1.2.3