Last active
December 30, 2015 12:33
-
-
Save alexaleluia12/7a37c64d5a1f1327d528 to your computer and use it in GitHub Desktop.
Exclude executable files but not .sh files nor directories
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/bash | |
# to get the list of files to exclude | |
# ls -al | grep ^- | egrep "^[a-z-]+x " | grep -v .sh$ | cut -d' ' -f 9 > arq_exc | |
# then | |
for i in $(cat arq_exc); do | |
rm - $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment