diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-23 01:16:57 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-23 01:16:57 +1300 |
commit | 060c814e1e263edb0d7f4c614460697391ad2911 (patch) | |
tree | 375a6f912def7cb81460660636d52cca2749447b /bin/pph | |
parent | Change htref(1df) into proper source format (diff) | |
download | dotfiles-060c814e1e263edb0d7f4c614460697391ad2911.tar.gz dotfiles-060c814e1e263edb0d7f4c614460697391ad2911.zip |
Swap pph(1df) sed(1) subst for awk(1) concat
Technically safer; regex metacharacters in the hostname (!) would break
the sed.
Diffstat (limited to 'bin/pph')
-rwxr-xr-x | bin/pph | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ #!/bin/sh # Run pp(1df) on args, prefix with machine hostname -hostname=$(hostname -s) || exit +hn=$(hostname -s) || exit pp "$@" | -sed 's_^_'"$hostname":'_' +awk -v hn="$hn" '{ print hn ":" $0 }' |