I have a script that creates images from files with certain date and time. This date and time is stored in list.txt file, few lines with same date and different time
2020 03 12 11 45
2020 03 12 10 23
2020 03 12 04 12
2020 03 12 00 23
I read this TXT file in a while loop:
while read line
do
echo Line is... $line
echo $line > $BIN/line.txt
python3 $BIN/makeimage.py #creates image
done < $BIN/list.txt
The filename of output images looks like: filename_202003_1245.png.
What's the easiest solution, to check if the file already exists and then skip to next line in list.txt? Now my script is just overwriting images again and again. Not sure if I have to delete line from list.txt as soon as image is created OR use awk - grep to extract hour and minute from list.txt and then from filename and compare them.