Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for filename in $(ls | grep -P -o '[0-9]{13}(?=(\.jpg))')
- do
- echo $filename
- timevalue=$(echo $filename | grep -P -o '1[0-9]{9}(?=[0-9]{3})')
- echo $timevalue
- main_time=$(date -d @${timevalue} "+%Y-%m-%d-%H-%M-%S")
- echo $main_time
- mv $filename.jpg $main_time.jpg
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement