Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. myfiles=`ls -lrt photo*.jpg | awk ' { print $9 } '`
  4. newprefix=photo
  5. fileno=0
  6.  
  7. for file in $myfiles; do
  8. fileno=$(($fileno + 1))
  9. mv $file $newprefix$fileno
  10. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement