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 IamaSherpa 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. hodgins

    scripts works with awk 3.1.3 but not with 3.1.5

    this works but could probably be better. cal 10 2007 | awk NF | awk '{last=$NF}END{print last}'
  2. hodgins

    scripts works with awk 3.1.3 but not with 3.1.5

    my bad that does work...for this month. what about a month that has a blank line at the end? cal 10 2007 | awk '{last=$NF}END{print last}'
  3. hodgins

    scripts works with awk 3.1.3 but not with 3.1.5

    i get no output? with either version of awk.
  4. hodgins

    scripts works with awk 3.1.3 but not with 3.1.5

    script gives last day of the month with awk 3.1.3 but with awk 3.1.5 LAST_DAY is MT? #!/bin/ksh LAST_DAY=`cal | awk '{ if ( length($0) > 0 ) { end_of_month=$0 } } END { printf "%s\n",substr(end_of_month,length(end_of_month) -1 ) }'` echo $LAST_DAY

Part and Inventory Search

Back
Top