hallo
I've the following problem while bash scripting (my nightly download script)
I need for an date comparison to convert a file of dates.
initial date format is "Sun, 03 Jul 2022 02:35:26 GMT" and should be converted to format: 202207030435.
let say the file is named "dates"
the following for loop doesn't work cause of the blanks in each line:
for i in $(cat dates); do date -d $i '+%Y%m%d%H%M'; done.
How to read the file line by line without stumbling over the blanks in the lines.
trying to put ' or " in front and at the end of each line doesn't work out ...