pastebin - collaborative debugging tool
blankb.kpaste.net RSS


Renumber
Posted by Anonymous on Sat 4th Nov 2017 09:47
raw | new post
modification of post by Anonymous (view diff)

  1. #odd
  2.  
  3. export j=-1; ls *.jpg | sort -n | while read x ; do let j+=2; fn=`printf %03d $j` ; echo mv \"$x\" p$fn.jpg; done | cat
  4.  
  5. #even renumber backwards:
  6. export j=0; ls SCN*.jpg | sort -rn | while read x ; do let j+=2; fn=`printf %03d $j` ; echo mv \"$x\" p$fn.jpg; done | cat
  7.  
  8. #crop
  9. ls | awk '1==1 {printf("mogrify -crop 2100x1400+250+0 -rotate 90 +repage %s\n",$0);}'

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at