4 ms·
I use awk only for trivial commands that fit in one line. Here is my last one. awk -F : '/^OPS1:/{print $2}' < machinelist I think the article could add an ex
by reacweb 12y ago
I use awk only for trivial commands that fit in one line. Here is my last one.
awk -F : '/^OPS1:/{print $2}' < machinelist
I think the article could add an example of this kind of simple usages.
- aidos 12y agoHere's my last one (find half of the free memory to feed into a stress testing tool): stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.5;}' < /proc/meminfo)k --vm-keep -m 1 It's like playing terminal history awk roulette :)