Search results

Jump to: navigation, search
  • # while true; do cat /proc/meminfo | grep -E "MemFree|Buffers|Cached" | awk '{s+=$2} END {print s}'; sleep 1; done
    369 B (58 words) - 16:43, 29 April 2014
  • ...w-to-use-shell-variables-in-an-awk-script How to use shell variables in an awk script] ...S. use a space after -v or it will be less portable. E.g., awk -v var= not awk -vvar)
    402 B (69 words) - 01:44, 10 May 2017
  • $ echo "1 2 3" | awk '{for (i=1; i<=NF; i++) if (($i=="1") && ($(i+1)=="2")) print $(i+2)}'
    124 B (17 words) - 23:03, 5 August 2018
  • - name: run uname thru awk ansible.builtin.shell: /usr/bin/uname -a | awk '{print $NF}'
    4 KB (347 words) - 04:05, 19 April 2024

View (previous 20 | next 20) (20 | 50 | 100 | 250 | 500)