We use to run a shell script to calculate the timings of completed jobs in a linux server,where we need to get the timings of the jobs in a logfile.
Here in our logfiles we could find two types of scenarios- either this one -[INFO\] Total time: 4 minutes 2 seconds
or this one- INFO: Total time: 4:2.29s
here i need to get the timings - 4 minutes 2 seconds or 4:2.29s using a single grep command using a OR condition.
I wonder if anyone is able to determine what you need to grep and what output you expect based on your description, but there is plenty of info and examples on the web demonstrating the use of grep with OR operators, for instance: 7 Linux Grep OR, Grep AND, Grep NOT Operator Examples