Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function png2jpeg() {
  2. echo 'Warning this command wil convert all png in jpeg recursively and delete png files'
  3. echo "Do you wish to Continue?"
  4. select yn in "Yes" "No"; do
  5. case $yn in
  6. Yes )
  7. for f in `find . -name "*.png"`
  8. do
  9. alpha=$(identify -format %A $f)
  10. if [ "$alpha" == 'False' ]
  11. then
  12. convert $f ${f/.png/.jpg}
  13. rm $f
  14. fi
  15. done
  16. break;;
  17. No )
  18. exit;;
  19. esac
  20. done
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement