I have the next fragment of the output of a log:
Server Server: Server
Date and Time: June 04 2018 14:10:00
--
Product Version User Host IP Duration
Software1 11.0 user user *.**.***.*** 10:08
Software2 11.0 user user *.**.***.*** 10:05
===================================================================================
I want with cut command only filter to the output like:
Product Version Host IP Duration
Software1 11.0 user *.**.***.*** 10:08
Software2 11.0 user *.**.***.*** 10:05
Also, I want to know if is possible apply the same filter many times, because the first example above, it repeats himself in the whole file.
cut
command selects columns (fields) to retain, but it does not help with filtering lines. From the example it appears the goal is to do both. It is not clear from the example if lines can be filtered strictly by pattern matching (eg.grep
), but that's a possibility. Or it might be necessary to use anawk
script or some other scripting language. It's not really clear from the sample fragments.