Skip to content

Instantly share code, notes, and snippets.

@aruseni
Created September 13, 2014 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aruseni/3d422b9512b39f69bb8a to your computer and use it in GitHub Desktop.
Save aruseni/3d422b9512b39f69bb8a to your computer and use it in GitHub Desktop.
Converts every .pnm file in the current working directory to .tiff. The numbers from 01 will be used for naming the .tiff files.
i=1 ; for pnmfile in *.pnm ; do tifffile=$(printf %02d.tiff $i) ; convert -compress lzw $pnmfile $tifffile ; i=$((i+1)) ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment