|
trivial awk question
i posted a reply the other day and needed an answer to this question while i was clarifyiing a few matter.. "how to compare to date variable in string format without having to compare word for word"..
my reply was to try to use awk to compare the strings.. I wasn't quite sure if i remembered how to do this so I told the original postee to navigate to a site that would give the right syntax..
today I ran through into some good questions in a book on c and was wondering if this syntax would work in awk:
date1=a
date2=b
awk -v $a=a, $b=b 'BEGIN{if ($a < $b) ? print "a" : print "b"}'
if this doesn't work any feedback welcome to jog my memory a little
thanx moxxx68
|