Re: Extract specific date in a directory and send output through email
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 08/14/04
- Previous message: DaveL: "Extract specific date in a directory and send output through email"
- In reply to: DaveL: "Extract specific date in a directory and send output through email"
- Next in thread: Alan Connor: "Re: Extract specific date in a directory and send output through email"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 14 Aug 2004 00:59:56 -0400
In article <69e9ce57.0408131902.7a399fb8@posting.google.com>,
davidludeman@cox.net (DaveL) wrote:
> Greetings folks...need some help.
>
> Here is the current script that I have:
>
> This first line is fine and it pulls the entire file strucutre in the
> directory:
>
> ls -lrt /bs/processing/* >> jess1.txt
>
> However, my problem is i only need the current days data, today.
>
> I thought i could use this:
>
> dateM='date | cut -c 5-10'
> cat jess1.txt ls -lartR |grep "$dateM" >> jess2.txt
>
> But this is not pulling out anything.
>
> please help....
You have to use backticks, not quotes, in the variable assignment
statement:
dateM=`date | cut -c 5-10`
But it would be even better to use date's formatting option rather than
cut:
dateM=`date '+%b %e'`
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Previous message: DaveL: "Extract specific date in a directory and send output through email"
- In reply to: DaveL: "Extract specific date in a directory and send output through email"
- Next in thread: Alan Connor: "Re: Extract specific date in a directory and send output through email"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|