workflow:image_type

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
workflow:image_type [2018/02/18 21:54] – [PROCESSING] Júne Parkworkflow:image_type [2018/02/18 21:56] – [PROCESSING] Júne Park
Line 23: Line 23:
 rename -n 's/(.{10}).*(\.jpg)$/$1$2/' *.jpg rename -n 's/(.{10}).*(\.jpg)$/$1$2/' *.jpg
 </code>  </code> 
- 
 <code bash> <code bash>
 $ rename -n 's/(.{10}).*(\.jpg)$/$1$2/' *.jpg $ rename -n 's/(.{10}).*(\.jpg)$/$1$2/' *.jpg
Line 33: Line 32:
 The -n option only simulates the command, so that you can verify the changes. Run without it to actually make the changes. The -n option only simulates the command, so that you can verify the changes. Run without it to actually make the changes.
  
-The regex (.{10}).*(\.jpg) consists:+The regex ''(.{10}).*(\.jpg)'' consists: 
  
-<text> +''.{10}'' - any 10 characters, in a group (…), followed by ''.*'' - any number of any characters followed by ''\.jpg$''  
-.{10} - any 10 characters, in a group (…), followed by .* - any number of any characters followed by \.jpg$  +the extension at the end ''($)'' of the filename, in the second group. The replacement ''$1$2'' is just the first group followed by the second.
-the extension at the end ($) of the filename, in the second group. The replacement $1$2 is just the first group followed by the second. +
-</text>+
  
 ----  ---- 
  • workflow/image_type
  • Last modified: 2018/07/07 08:00
  • by Júne Park