Get only part of a line using awk
I have a log file and I am using awk to fetch the columns I need. My team
awk '{ print $2" "$5" " $6}' log.txt
The $ 5 column contains the server name, and the format can be @: server1 @: @: @: server2 @: @: @: @ :, @: @: Server3 without a fixed number of @: characters.
How do I change my operator to remove all "@:" from column 5 to get only the server name?
+2
source to share