Skip to content

Instantly share code, notes, and snippets.

@alexaleluia12
Last active December 30, 2015 12:33
Show Gist options
  • Save alexaleluia12/7a37c64d5a1f1327d528 to your computer and use it in GitHub Desktop.
Save alexaleluia12/7a37c64d5a1f1327d528 to your computer and use it in GitHub Desktop.
Exclude executable files but not .sh files nor directories
#!/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