Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bishop7

    sum disk usage from df -k with awk help

    Thanks.. I don't really understand why taking out the BEGIN makes it work corretly. But very big thanks
  2. bishop7

    sum disk usage from df -k with awk help

    I am trying to use awk to sum the outputs from a df –k on second column. Here is what I have so far: df -k |nawk 'BEGIN {NR > 1 }{ sum +=$2} END {print "\n Total diskspace in Kbytes: " sum }' The problem is that this does not seem to sum correctly. It’s missing the last row from the df...
  3. bishop7

    how to escape ' in awk

    Can someone please tell me how to escape ' in the printf of an awk script. Here is an example nawk '{printf("exec dbms_system.SET_BOOL_PARAM_IN_SESSION(%s,%s,\'\n",$1,$2)}' $tracefile >xx it's the first ' right before the \n" that's blowing up. Thanks

Part and Inventory Search

Back
Top