Thursday, June 11, 2009
simple awk usage
note to self
Once again, something i can't seem to hold in my mind, and end up searching for it over and over.
Awk can be used in this way to filter out a field from a text file when the separator is a " " ( WHITE SPACE )
awk '{ print $n}'
$n - is the field/column number
This can also be used in many other things for example, -my favourite- to take out the leading white spaces on queue_ids from grep'd and cut'd ;-) postfix logs.
Thanks dhaj for showing me this trick.
Subscribe to:
Post Comments (Atom)
changing opnsense mtu
note to self When an OpnSense is deployed on Proxmox environment where MTU is <1500, it doesn't seem to auto-detect and leaves the O...
-
Below is procedure i used in integrating squid with OpenLDAP, and the Active Directory with the information gathered from numerous google se...
-
note to self RHN doesn't seem to play well with download managers. "wget" used to be good but noticed a small problem lately...
2 comments:
The whitespace in the first example is showing, so both of them look the same.
thanks! tried to get it to show the output in the correct way, but didn't work. I just removed that part. :D
Post a Comment