Even after using linux command line for years it is always useful to see how others use it. I tend to overuse perl regex's to massage the data how I want it and underuse awk.
my norm is
cat file | perl -p -e "s/.from ([0-9\.]+) ./\1/g"
to get the ip out of the same datafile.
regex's seem to help with messy data or data that contains inconsistent delimiters.
(some of the stars got stripped by HN so the above won't work)
my norm is cat file | perl -p -e "s/.from ([0-9\.]+) ./\1/g" to get the ip out of the same datafile.
regex's seem to help with messy data or data that contains inconsistent delimiters.
(some of the stars got stripped by HN so the above won't work)