wiki

knowledgebase of randomness
git clone git://parazyd.org/wiki.git
Log | Files | Refs

Awk.wiki (296B)


      1 = awk knowledgebase =
      2 
      3 == print everything except $1 ==
      4 	{{{shell
      5 	awk '{for (i=2; i<=NF; i++) print $i}' filename
      6 	}}}
      7 
      8 == sum numbers from a pipe ==
      9 	{{{
     10 	cat history.json | jq '.[] | select( .id | contains("dyne")) | .amount'
     11 	1200
     12 	1500
     13 	1500
     14 	1300
     15 		| awk '{s+=$1} END {print s}'
     16 	5500
     17 	}}}