Skip to content

Instantly share code, notes, and snippets.

@joecannatti
Created November 2, 2011 01:53
Show Gist options
  • Save joecannatti/1332641 to your computer and use it in GitHub Desktop.
Save joecannatti/1332641 to your computer and use it in GitHub Desktop.
epub_permission.sh
function kk {
echo ""
echo "The epubs on your desktop are:"
cd ~/Desktop;
index=0
FILES=()
for i in $(find . -name \*epub); do
unset done
if [ -x $i ]; then
done="(already converted)"
fi
index=`expr $index + 1`
echo $index")" $i $done
FILES[$index]=$i
done
echo ""
echo "Which file would you like to convert?"
read count
file_to_convert=${FILES[count]}
chmod -v +x $file_to_convert
if [ -x "$file_to_convert" ]; then
echo "S'ALL GOOD!!"
fi
echo ""
echo ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment