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/d2u | |
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/d2u')
-rw-r--r-- | bin/d2u | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/d2u b/bin/d2u new file mode 100644 index 00000000..81700e15 --- /dev/null +++ b/bin/d2u @@ -0,0 +1,9 @@ +#!/bin/sh +r=$(printf '\r') +for fn ; do + ed -s -- "$fn" <<EOF || ex=1 +g/$r\$/ s/$r\$// +w +EOF +done +exit "${ex:-0}" |