Difference between revisions of "Awk"

From Vague Hope Wiki
Jump to: navigation, search
(Created page with " awk -F'"' '{print $3}' awk '{print $4 "|" $5}' awk 'BEGIN { FS = "|" } ; { print $10 }' awk '{total += $1; count++} END { print total/count } END {print count}' awk -F'|'...")
 
Line 1: Line 1:
  awk -F'"' '{print $3}'
+
  awk '{print $3}'
 
  awk '{print $4 "|" $5}'
 
  awk '{print $4 "|" $5}'
 
  awk 'BEGIN { FS = "|" } ; { print $10 }'
 
  awk 'BEGIN { FS = "|" } ; { print $10 }'
 
  awk '{total += $1; count++} END { print total/count } END {print count}'
 
  awk '{total += $1; count++} END { print total/count } END {print count}'
  awk -F'|' '{printf "%s,%s\n", $1,$12}'
+
  awk '{printf "%s,%s\n", $1,$12}'
  awk -F, '{print ((substr($1,15,2) * 60) + substr($1,18,2)) "," $2}'
+
  awk '{print ((substr($1,15,2) * 60) + substr($1,18,2)) "," $2}'
 
  awk '{sub(/\/$/, "") ; print $1}'
 
  awk '{sub(/\/$/, "") ; print $1}'
 +
awk '$12 > 3 {print $0}'

Revision as of 06:29, 15 February 2016

awk '{print $3}'
awk '{print $4 "|" $5}'
awk 'BEGIN { FS = "|" } ; { print $10 }'
awk '{total += $1; count++} END { print total/count } END {print count}'
awk '{printf "%s,%s\n", $1,$12}'
awk '{print ((substr($1,15,2) * 60) + substr($1,18,2)) "," $2}'
awk '{sub(/\/$/, "") ; print $1}'
awk '$12 > 3 {print $0}'