From 97becb02d2aa821d14077c3f0064000318a4ae71 Mon Sep 17 00:00:00 2001 From: katherine Date: Mon, 1 Feb 2016 23:33:54 -0700 Subject: uniq doesn't work for some reason x-x so confused. does it wait to output things when piping? --- .config/herbstluftwm/panel.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.config/herbstluftwm/panel.sh') diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index 890bc96..66ecdde 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -114,7 +114,9 @@ fields[6]="" # date fields[7]="$(update_date)" - +unique_line() { + awk '$0 != l { print ; l=$0 ; fflush(); }' +} ###################### # EVENT GENERATORS # @@ -151,7 +153,7 @@ event_mpd() { fi mpc idle player >/dev/null 2>&1 fi - done > >(uniq) + done > >(unique_line) } event_stat() { @@ -166,7 +168,7 @@ event_when() { echo -e 'when\t1' fi sleep 10 - done > >(uniq) + done > >(unique_line) } -- cgit v1.2.3