Search results

Jump to: navigation, search

Page title matches

  • preceded by '''awk -F'''
    114 B (12 words) - 17:33, 25 February 2013
  • # echo 1 | awk '{ if ($1==1) print "Active"; if ($1==0) print "Standby";}' # echo 0 | awk '{ if ($1==1) print "Active"; if ($1==0) print "Standby";}'
    259 B (32 words) - 19:01, 25 February 2013
  • awk '{ print $NF }' awk '{ i = NF-1; print $i }'
    1 KB (184 words) - 14:03, 21 August 2013
  • awk '{print "\x27" }' [[category:awk]]
    57 B (10 words) - 19:36, 16 August 2013
  • on different lines of stdin, awk will do... awk '{s+=$1} END {print s}'
    173 B (31 words) - 14:38, 18 January 2014
  • # echo "1 2 3 4 5 6 rule: 7 8 9 10" | awk '{for (i=1; i<=NF; i++) if ($i=="rule:") print $(i+1)}' [[category:awk]]
    219 B (32 words) - 02:34, 6 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

Page text matches

  • preceded by '''awk -F'''
    114 B (12 words) - 17:33, 25 February 2013
  • # echo "8.46145e+09" | awk '{ printf ("%.0f\n",$1) }'
    1 KB (90 words) - 05:14, 10 January 2014
  • nslookup rsync.gentoo.org | grep -v "#" | grep Address |awk '{ printf "iptables -I FORWARD -p tcp -d " $2 " --dport 873 -j ACCEPT\n"}' nslookup distfiles.gentoo.org | grep -v "#" | grep Address |awk '{ printf "iptables -I FORWARD -p tcp -d " $2 " --dport 80 -j ACCEPT\n"}'
    975 B (148 words) - 07:08, 14 September 2013
  • # echo 1 | awk '{ if ($1==1) print "Active"; if ($1==0) print "Standby";}' # echo 0 | awk '{ if ($1==1) print "Active"; if ($1==0) print "Standby";}'
    259 B (32 words) - 19:01, 25 February 2013
  • awk '{ print $NF }' awk '{ i = NF-1; print $i }'
    1 KB (184 words) - 14:03, 21 August 2013
  • cidr=`awk -F / \'{print $2}\'`
    130 B (19 words) - 22:27, 25 February 2013
  • awk — remove new line characters with awk or gawk Either of the following commands can be used to delete new lines using awk or gawk.
    658 B (126 words) - 04:06, 29 March 2013
  • cp -a arch/x86/boot/bzImage /boot/kernel-`ls -l /usr/src/linux |awk -F "> " '{print $2}'` oldkern=`ls -l /boot/vmlinuz | awk '{ print $NF }'`; ln -s $oldkern /boot/vmlinuz.old
    2 KB (285 words) - 16:19, 18 December 2016
  • awk, 2nd Edition," by Dale Dougherty and Arnold Robbins (O'Reilly, metacharacter in awk, perl, and HHsed, sedmod, and GNU sed v3.02.80.
    17 KB (2,827 words) - 16:14, 8 May 2016
  • # qlop -l | awk '{print $2,$3,$5}' | uniq -c
    1,005 B (140 words) - 05:08, 27 March 2016
  • ls -A | grep -v -e '^\.\.$' |xargs -i du -ks {} |sort -rn |head -11 | awk '{print $2}' | xargs -i du -hs
    106 B (23 words) - 15:43, 10 July 2013
  • # vnstat --dumpdb | grep ^h | awk -F ";" '{ print "hour", $2 "-" $2+1,"rx(Mb/s):", $4/3600000*8, "tx(Mb/s):",
    927 B (143 words) - 20:48, 24 May 2014
  • while true; do netstat -i | grep -v -E "lo|Kernel|RX" | awk '{print $5,$6,$7,$9,$10,$11 ","}' | tr -d "\n"; echo; sleep 5; done
    517 B (78 words) - 18:06, 8 October 2013
  • # '''netstat -i | awk '{for (i=1; i<=12; i++) printf "%-12s",$i; printf "\n" }''''
    5 KB (178 words) - 20:25, 1 January 2015
  • awk '{print "\x27" }' [[category:awk]]
    57 B (10 words) - 19:36, 16 August 2013
  • Howto print text between tags or characters with awk or sed $ echo "bla(foo)ar"|awk -F'[(|)]' '{print $2}'
    434 B (68 words) - 17:50, 4 December 2013
  • on different lines of stdin, awk will do... awk '{s+=$1} END {print s}'
    173 B (31 words) - 14:38, 18 January 2014
  • cat Download.csv | sed -e '1d' | awk -F "\",\"" '{ for (i=1; i<=NF; i++); printf substr($1,2) "," $7 "," $12 ","
    291 B (36 words) - 21:17, 11 October 2013
  • # du -s * | awk '{s+=$1} END {print s " / " 1048576 }' | bc -l | awk '{ printf ("%.2f%s\n",$1," GB") }' # du -s *.log | awk '{s+=$1} END {print s " / " 1048576 }' | bc -l | awk '{ printf ("%.2f%s\n",$1," GB") }'
    282 B (47 words) - 14:50, 18 January 2014
  • # echo "1 2 3 4 5 6 rule: 7 8 9 10" | awk '{for (i=1; i<=NF; i++) if ($i=="rule:") print $(i+1)}' [[category:awk]]
    219 B (32 words) - 02:34, 6 April 2014

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