Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
About Us Register FAQ Members List Calendar Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old November 5th, 2002   #1 (permalink)
Registered User
 
Sniper's Avatar
 
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
Sniper is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 23:06.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5