Ravi Sir's Cards › AWS
Interview one-liners
This revision card explains Interview one-liners. It starts from the need that top IPs. It describes column sum. The how-to section notes replace in file. An example on the card is old files.
Read card text
What this card says
Why do we need it?
Top IPs.
awk '{print $1}' log | sort | uniq -c | sort -rn
What is it?
Column sum.
awk -F, '{s+=$3}END{print s}'
How to do it
Replace in file.
sed -i 's/a/b/g' f
Example
Old files.
find . -mtime +7