Last active
          August 29, 2015 14:21 
        
      - 
      
- 
        Save stevenvo/8c46690f2b7414e6d522 to your computer and use it in GitHub Desktop. 
    Convert images to PDF in order of filename, with text prefix and numerical suffix, such as Untitled-0.jpg, Untitled-1.jpg, etc.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ls tap1/*.jpg | sort -t- -nk2,2 | tr '\n' ' ' | sed 's/$/\ tap1.pdf/' | xargs convert | 
ls bay_vien_ngoc_rong__$1*.jpg | sort -t_ -nk2,2 | tr '\n' ' ' | sed "s/$/\ tap$1.pdf/" | xargs convert
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
ls bay_vien_ngoc_rong__010*.jpg | sort -t_ -nk2,2 | tr '\n' ' ' | sed 's/$/\ tap10.pdf/' | xargs convert