aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-05-22 11:02:12 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-05-22 11:02:12 +1200
commite2468cb0f96864259bfd4518a72b2291054e325e (patch)
treedfd713e51235438d3e4083443a5cd25f9c33d78b /bin
parentJust use whichever vi(1) we need as VISUAL (diff)
downloaddotfiles-e2468cb0f96864259bfd4518a72b2291054e325e.tar.gz
dotfiles-e2468cb0f96864259bfd4518a72b2291054e325e.zip
Avoid awk(1) fork in pph(1df)
Diffstat (limited to 'bin')
-rw-r--r--bin/pph.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/pph.sh b/bin/pph.sh
index 268b6ad7..ce516c16 100644
--- a/bin/pph.sh
+++ b/bin/pph.sh
@@ -1,4 +1,5 @@
# Run pp(1df) on args, prefix with machine hostname
hn=$(hostname -s) || exit
-pp "$@" |
-awk -v hn="$hn" '{ print hn ":" $0 }'
+pp "$@" | while IFS= read -r path ; do
+ printf '%s:%s\n' "$hn" "$path"
+done