1

Advanced string search + selection

view story
linux-howto

http://www.unix.com – Hi All, I want to run a script that will search backwards through a text file until it finds a certain string, something like "Date/Time/Eng" and select a string which happens to be a date and save that as a variable. The line will always be in the following exact format: Date/Time/Eng. : YYYY-MM-DD / HH:MM / XXXX ZZ where I want to save the bold date and time as a variable (START). (I will later use this variable as a start value to calculate time elapsed between START and END) Also I am assuming that the string will be recognized as a date + time by UNIX. I have a script t (HowTos)