From: Armaan Bhojwani Date: Mon, 5 Jul 2021 21:03:34 +0000 (-0400) Subject: fmt: remove trailing whitespace X-Git-Url: https://git.armaanb.net/pong/refs/?p=bin.git;a=commitdiff_plain;h=ab93f6d834d2f8c4a38ca07127a81e4a908e3565 fmt: remove trailing whitespace --- diff --git a/fmt b/fmt index 71c95ac..8aa8173 100755 --- a/fmt +++ b/fmt @@ -1,3 +1,3 @@ #!/usr/bin/env sh -awk '/^$/ {print} /./ {printf("%s ", $0)} END {print ""} ' | fold -s $@ +awk '/^$/ {print} /./ {printf("%s ", $0)}' | fold -s $@ | sed 's/\s$//g'