Hello friends,
I couldnt connect two search patterns in awk, what i want is to search for two words in a log file;
"[0-9]+MB)" and "Done"
i use this code
/usr/xpg4/bin/awk '/[0-9]+MB)/ {gsub("\(","",$5);print int($5)}' mylog.txt
and i get integer part of (123,45MB) in a log file "mylog" with above code. i want to search the line with also second patternt "Done" for more precise results. how can i do this, i tried this but didnt work:
/usr/xpg4/bin/awk '/[Dd]one && [0-9]+MB)/ {gsub("\(","",$5);print int($5)}' mylog.txt
I'd appreciate any help.
Thanks in advance