From 19f90233ded301b5613f926d96b2e79afc380091 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Sun, 28 Apr 2024 23:32:23 -0400 Subject: [PATCH] Add a dos2unix alias for recursive application --- .aliases | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.aliases b/.aliases index c75c5ff..eae1cb3 100644 --- a/.aliases +++ b/.aliases @@ -238,6 +238,16 @@ alias cls=clear alias cpr='cp -r' alias dc='gdc' alias duh='du -csh' + +dos2unix_all() { + local path="$1" + if [[ $path == "" ]]; then + path="$PWD" + fi + find $path -type f -exec dos2unix '{}' '+' +} +alias d2u='dos2unix_all' + alias e='open_explorer_here "$PWD"' alias exp='echo "Use e instead."' alias f='fg'