Advertisement
ShoLah0

bash rename

Sep 5th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | None | 0 0
  1. for old in ./images*.png; do
  2.     new=$(echo $old | sed -e 's/\.png$/test.png/')
  3.     mv -v "$old" "$new"
  4.   done
  5.  
  6.  
  7.  for old in ./240x320jpg_72dpi/*_h.jpg; do        
  8. \ new=$(echo $old | sed -e 's/\_h.jpg$/.jpg/')
  9. \ mv -v "$old" "$new"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement