diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-03 23:30:46 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-03 23:30:46 +1200 |
commit | 080bd0e5a09a5ee9974c4d02413e70fd363b7ad3 (patch) | |
tree | 13c8bb75aec300f66e3cd4c1cfc4369281ce8150 /bin/u2d | |
parent | Add references between stbl.1 and stws.1 (diff) | |
download | dotfiles-080bd0e5a09a5ee9974c4d02413e70fd363b7ad3.tar.gz dotfiles-080bd0e5a09a5ee9974c4d02413e70fd363b7ad3.zip |
Add d2u(1) and u2d(1)
Diffstat (limited to 'bin/u2d')
-rw-r--r-- | bin/u2d | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/u2d b/bin/u2d new file mode 100644 index 00000000..5b4a96b6 --- /dev/null +++ b/bin/u2d @@ -0,0 +1,10 @@ +#!/bin/sh +r=$(printf '\r') +for fn ; do + ed -s -- "$fn" <<EOF || ex=1 +g/[^$r]\$/ s/\$/$r/ +g/^\$/ s/\$/$r/ +w +EOF +done +exit "${ex:-0}" |