aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-14 13:46:26 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-14 13:46:26 +1200
commitfbd4583876ac9dbf5c94959bee25aea85f114109 (patch)
tree0ea067dbf38835c1f1197687f831bcd7fd586f4d /bin
parentMake brxs(1) executable (diff)
downloaddotfiles-fbd4583876ac9dbf5c94959bee25aea85f114109.tar.gz
dotfiles-fbd4583876ac9dbf5c94959bee25aea85f114109.zip
Add unf(1)
Diffstat (limited to 'bin')
-rw-r--r--bin/unf.sed17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/unf.sed b/bin/unf.sed
new file mode 100644
index 00000000..23270fc6
--- /dev/null
+++ b/bin/unf.sed
@@ -0,0 +1,17 @@
+# Unfold lines with leading spaces (e.g. RFC 822 headers)
+/^[ \t]/!{
+ 1!{
+ x
+ p
+ x
+ }
+ h
+}
+/^[ \t]/{
+ H
+ x
+ s/[\r\n]//g
+ x
+}
+$!d
+x