Last active
September 9, 2019 16:04
-
-
Save niedzielski/7732de4e4864f0d394ca0a056bd6b1cf to your computer and use it in GitHub Desktop.
Some different Bash looping options.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -not \( \( -name node_modules -o -name .git -o -name dist \) -prune \) -type f -name \*.css| | |
# a | |
while IFS= read -r file; do git mv "$file" "${file%.css}.less"; done | |
# b | |
xargs -rd\\n -i sh -c 'git mv {} $(dirname {})/$(basename {} .css).less' | |
time while IFS= read -ru9 -d $'\n' line; do | |
echo -n "$line" | |
done 9< <(ls -1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment