Unix Programming - capturing files in specific month

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > August 2006 > capturing files in specific month





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author capturing files in specific month
pawan_test

2006-08-21, 1:34 pm

Hi All,

-FFFF---- 1 SKK UL2052 168 Jul 20 FILE.NAME

I HAVE A file which comes in the above format.

can anyone please suggest me how do i capture all the files arrived in
a
specific month say July in unix.

I have to capture the Actual files ( i.e files with data not 0 byte
files).

Thanks
pavi

Theo v. Werkhoven

2006-08-21, 7:26 pm

The carbonbased lifeform pawan_test inspired comp.unix.programmer with:
> Hi All,
>
> -FFFF---- 1 SKK UL2052 168 Jul 20 FILE.NAME
>
> I HAVE A file which comes in the above format.
>
> can anyone please suggest me how do i capture all the files arrived in
> a
> specific month say July in unix.
>
> I have to capture the Actual files ( i.e files with data not 0 byte
> files).


#v+
export MONTH=Jul

echo "-FFFF---- 1 SKK UL2052 0 Jul 20 FILE.NAME" |\
awk -v MON=$MONTH 'strtonum($5) != 0 && $6 == MON {print $8}'
FILE.NAME
#v-

Theo
--
theo at van-werkhoven.nl ICQ:277217131 SuSE Linux
linuxcounter.org: 99872 Jabber:muadib at jabber.xs4all.nl AMD XP3000+ 1024MB
"ik _heb_ niets tegen Microsoft, ik heb iets tegen
de uitwassen *van* Microsoft"
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com