diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-03 01:21:00 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-03 01:21:00 +1300 |
commit | e43633aa54c25918ff9dd8a89f91b8342fe66e06 (patch) | |
tree | c7e894881c3616be727d8bde32247ee52a5dd333 /bin | |
parent | Add another issue (diff) | |
download | dotfiles-e43633aa54c25918ff9dd8a89f91b8342fe66e06.tar.gz dotfiles-e43633aa54c25918ff9dd8a89f91b8342fe66e06.zip |
Convert sd2u and su2d to awk
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sd2u.awk (renamed from bin/sd2u.sed) | 3 | ||||
-rw-r--r-- | bin/su2d.awk (renamed from bin/su2d.sed) | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/sd2u.sed b/bin/sd2u.awk index 14588623..87f710b2 100644 --- a/bin/sd2u.sed +++ b/bin/sd2u.awk @@ -1,2 +1,3 @@ # Convert DOS line endings to UNIX ones -s/\r$//g +{ sub(/\r$/, "") } +1 diff --git a/bin/su2d.sed b/bin/su2d.awk index 06998986..f9160ab0 100644 --- a/bin/su2d.sed +++ b/bin/su2d.awk @@ -1,2 +1,3 @@ # Convert UNIX line endings to DOS ones -/[^\r]$/s/$/\r/g +!/\r$/ { $0 = $0 "\r" } +1 |