Posted By

secdebian on 03/20/16


Tagged

sort awk wc cat gunzip


Versions (?)

# print every line after replacing each field with its absolute value


 / Published in: Bash
 

  1. gunzip {filename}.gz
  2. sort {filename} | uniq -c > {filename}_count
  3. awk '{if($1 > 3) { print $2 } }' {filename} > {filename}_file
  4. wc -l {filename}
  5. cat {filename} | awk -F : '{sum+=$5} END {print "AVG=",sum/NR}'

Report this snippet  

You need to login to post a comment.