Bash script to sort image files
I am trying to write a simple bash script or one line command to basically sort a bunch of .jpg files by date from `identify -verbose` command.
The reason I don't use `ls -l` command to parse date is because the date stamp is incorrect. Here's what I have: Code:
identify -verbose *.jpg | awk '/Date Time Original: 2005:02:13 / {print $4}' And how would I pass those files to be copied to other directory? Thanks in advance. |
hello dtcs. can you post the output of your command? tnx
|
it just prints the same date for files that match the expression.
date is the 4th column in that line. Now I am not that good with awk. If I want to show the file name, one way of doing it is by calling another expression in awk like /^Image:/ but how do I do that only if first expression is True. |
ok dtcs but i really need a sample output of 'identify -verbose *.jpg' so that i'll know how to modify the statement. can you post them pls? even just for the output of 1 jpeg file. i don't have the 'identify' command btw.
|
identify is part of image magick
Code:
2005:02:13 |
try this command:
Code:
for a in *.jpg; do |
All times are GMT -5. The time now is 02:52 PM. |