Hi Folks -
I have the following file:
This file is exported after various steps of my data integration routine. I need to be able to dynamically download the latest logfile from this list that starts with a path of " outbox/logs/", all other entries can be ignored.
I have the following code which works if I know the name of the log:
_FDMEE_LOG="$(sort -r temp.txt | sed -n "\#${_OUTBOX_BIN}FINPLAN_# {s#.*/##; p; q}")"
I need to be able to find the latest file, regardless of the name as long as it starts with " outbox/logs/". I tried to add a wildcard to the above logic but it doesn't work. Can someone help me editing my syntax?
THe result should be : outbox/logs/FINPLAN_2201.log based on my sample data.
Thank you!