diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-05-25 21:20:27 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-05-25 21:20:27 +0300 |
commit | fbd04400142b27a6ec27927a89ddaf8a4e09ae5b (patch) | |
tree | 86395174cf8f851dca0754f0aa78fe4897a56373 | |
parent | README update (diff) | |
download | linux-home-fbd04400142b27a6ec27927a89ddaf8a4e09ae5b.tar.gz linux-home-fbd04400142b27a6ec27927a89ddaf8a4e09ae5b.zip |
add line endings conversion aliases (using sed)
Diffstat (limited to '')
-rw-r--r-- | .bashrc | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -247,6 +247,8 @@ adjust_dotfiles_permissions() { && popd > /dev/null } +alias dos2unix_='sed --binary --in-place '"'"'s/\(\r\?\)$//'"'" +alias unix2dos_='sed --binary --in-place '"'"'s/\r\?$/\r/'"'" alias rtrim_line_whitespace='sed --binary --in-place '"'"'s/[[:blank:]]*\(\r\?\)$/\1/'"'" alias rtrim_file_newlines_dos='sed --binary --in-place -e :a -e '"'"'/^\(\r\n\)*\r$/{$d;N;ba}'"'" alias rtrim_file_newlines_unix='sed --binary --in-place -e :a -e '"'"'/^\n*$/{$d;N;ba}'"'" |