Skip to content

Instantly share code, notes, and snippets.

@unabridgedxcrpt
Created December 15, 2015 21:07
Show Gist options
  • Save unabridgedxcrpt/3ce4457af9dac95346a9 to your computer and use it in GitHub Desktop.
Save unabridgedxcrpt/3ce4457af9dac95346a9 to your computer and use it in GitHub Desktop.
#!/bin/bash
# DESCRIPTION: Use as a template for operations on files/directories sent to the script.
# USAGE:
# FUTURE IMPROVEMENTS:
if [ $# -eq 0 ]
then
cat << _EOF_
USAGE: $0 file1 file2 ..., or
$0 *.jpg, or
$0 dir/*.jpg
...
_EOF_
exit
fi
while [ "$1" != "" ]; do
# Skip directories
if [ -d "$1" ]; then
shift
continue
fi
#########
#this is where the magic should happen
#########
shift
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment