]> git.armaanb.net Git - bin.git/commitdiff
fmt: remove trailing whitespace
authorArmaan Bhojwani <me@armaanb.net>
Mon, 5 Jul 2021 21:03:34 +0000 (17:03 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Mon, 5 Jul 2021 21:03:34 +0000 (17:03 -0400)
fmt

diff --git a/fmt b/fmt
index 71c95ac41bfd19d6e1338f5c46adf1c686efae8f..8aa81738ffdda0b74d78c53aa73f82c362d2566e 100755 (executable)
--- 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'