From 3cd67d994c181531d5c2cc0285b2ee6864349a7e Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Wed, 18 Jul 2018 21:47:19 -0500 Subject: [PATCH] .bashrc: Use `paste ... -` when reading from pipe GNU versions of `paste` will read from STDIN when no explicit file arguments, but some other UNIX platforms [e.g. AIX] have versions of `paste` which required an explicit "-" filename argument to indicate "read from STDIN". --- .bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 4696141..4202d0c 100644 --- a/.bashrc +++ b/.bashrc @@ -427,7 +427,7 @@ prm () { eval "${2:-PATH}='$(pls $2 | grep -v "^$1\$" | tr '\n' ':')'"; } # Example: # $ puniq /usr/bin:/usr/local/bin:/usr/bin # /usr/bin:/usr/local/bin -puniq () { echo "$1" | tr ':' '\n' | grep -v "^$" | nl | sort -u -k 2,2 | sort -n | cut -f 2- | paste -s -d ':'; } +puniq () { echo "$1" | tr ':' '\n' | grep -v "^$" | nl | sort -u -k 2,2 | sort -n | cut -f 2- | paste -s -d ':' -; } # --------------------------------------------------------------------------- # USER SHELL ENVIRONMENT -- 2.45.2