#This works?! awk 'BEGIN{ "date +%x~%X"|getline date "ls /"|getline ls print date" "ls }' #This creates a table list for nroff out of somthing that's been #hcln'd and cleaned up cat tmpfile|awk '{ getline b getline c print $0"|"b"|"c }' #This is the way to do get the third field of the tail -1 with awk firstdelta=`cat $sname|sed -n "/^.d D/p"|awk '{last=$0}END{$0=last;print $3}'` #This prints what comes out with octal values for num in `count 0 256` do count=`echo 000| sed "s/.\{${#num}\}$//"`$num eval "awk 'BEGIN{print $count \"\\t\\$count\"}'" done #WARNING: the ~ match will match on partial strings. #This is an EXACT match of COLOR and $NF awk -v COLOR="$1" '{match($NF,COLOR);if(length($NF)==RLENGTH)print$NF}' #as opposed to this, which matches on partial matches of COLOR awk -v COLOR=$1 '$NF ~ COLOR {print $NF}' #The gensub with the "G" globally strips those chars from the curr_temp #The +0 converts to number awk -v curr_temp="$CURR_TEMP" 'BEGIN{ if ((gensub(/[CKF°]/,"","G",curr_temp)+0) >= 98.9 ) print("HOT"); else print ("NOT HOT"); }' #Easy control char stripper awk '{gsub("[[:cntrl:]]","");print $0}' #Split file into words awk '{for(i=1;i<=NF;i++)print $i}' #Match any character in last (or x) field if(match($NF,"[\\.?!]") != 0) { print "MATCHED: "$0 }else{ print "NOPE: "$0 } }