]> git.armaanb.net Git - bin.git/commitdiff
fmt: add script
authorArmaan Bhojwani <me@armaanb.net>
Mon, 5 Jul 2021 17:11:01 +0000 (13:11 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Mon, 5 Jul 2021 17:11:01 +0000 (13:11 -0400)
fmt [new file with mode: 0755]
man/fmt.1.scd [new file with mode: 0644]

diff --git a/fmt b/fmt
new file mode 100755 (executable)
index 0000000..71c95ac
--- /dev/null
+++ b/fmt
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+awk '/^$/ {print} /./ {printf("%s ", $0)} END {print ""} ' | fold -s $@
diff --git a/man/fmt.1.scd b/man/fmt.1.scd
new file mode 100644 (file)
index 0000000..305839f
--- /dev/null
@@ -0,0 +1,15 @@
+fmt-music(1)
+
+# NAME
+fmt - a fake fmt implementaion
+
+# SYNOPSIS
+*fmt* [file to format]
+
+# DESCRIPTION
+A fake fmt implementation using fold and awk, for coreutils that don't come 
+with an fmt implementation. 
+
+# COPYRIGHT
+This is free and unencumbered software released into the public domain. For more
+information, please refer to <https://unlicense.org/>.
\ No newline at end of file