Having troubles with awk. Basically what I'm trying to do is search for this particular string in the file. And then print the 3rd element of that line.
Here's what I did:
awk -F' / ' '$1=="$log"{print $3}' schedlist
For some reason that won't work but if I do this:
awk -F' / ' '$1=="20121213-20:58:53"{print $3}' schedlist
The code works. But I need to let the user input log name.