Created
August 8, 2013 21:12
-
-
Save micalexander/6188788 to your computer and use it in GitHub Desktop.
bash:search with in current directory and locate files that are not prefixed with an underscore and have an extension of .scss and, prefix with an underscore.
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
| #!/bin/sh | |
| proj_dir_arrays=( $(find . -name 'partials' -type d ) ) | |
| location=`pwd` | |
| for proj_dir_array in "${proj_dir_arrays[@]}"; | |
| do | |
| cd $location/${proj_dir_array/.\/} | |
| shopt -s nullglob | |
| for x in *.scss; | |
| do | |
| if [[ $x != _* ]]; | |
| then | |
| mv $x _${x%}; | |
| fi; | |
| done | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment