|
|
|||||||
| About Us | Register | FAQ | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Registered User
![]() ![]() ![]() Join Date: Jun 2001
Posts: 460
|
help with awk
could anyone help me using awk plz
I want to find all file in the system of anyday, but the default day is today, I already send all the file with file name and date in a file call tfile, inside it got: filename day month year file1 5 Nov 2002 my variable are day = date +%d month = date +%m year = date +%Y which is 5 11 2002 I try to do like this awk -v var1= "$day" - v var2= "Nov" -v var3= "$year" ' BEGIN { if(var1==$2 *the day of the file* && var2= $3 *if month =nov* && var3==$4 ) printf("%s %s %s %s",$1,$2,$3,$4) } END {}' tfile is that right? coz I want to print all the file created or modified on today, I need to do other as well like in between certain day, but I gotta get used to how to use awk first, I learn abit of it 1 yr ago and now I forgot, plz help |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|