Re: Extract specific date in a directory and send output through email

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 08/14/04

  • Next message: Alan Connor: "Re: Extract specific date in a directory and send output through email"
    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 ***
    

  • Next message: Alan Connor: "Re: Extract specific date in a directory and send output through email"

    Relevant Pages

    • Re: Extract specific date in a directory and send output through email
      ... > Here is the current script that I have: ... > This first line is fine and it pulls the entire file strucutre in the directory: ... #Create the file manually the first time. ...
      (comp.unix.questions)
    • Re: Multiple processes; one file
      ... I recently inherited a rather kluge of a script. ... To multithread this thing I need to enable two processes to copy files from ... Maybe process A pulls from the top of the list and process B pulls from the ... Flock is available in most languages. ...
      (comp.unix.aix)
    • Re: ~~determining DNS server in network connection properties
      ... This is going to be a matter of writing a script that pulls this info. ... How to get the list of servers? ... You can then build SQL ...
      (microsoft.public.windows.server.active_directory)
    • Multiple processes; one file
      ... I recently inherited a rather kluge of a script. ... To multithread this thing I need to enable two processes to copy files from ... Maybe process A pulls from the top of the list and process B pulls from the ...
      (comp.unix.aix)
    • Multiple processes; one file.
      ... I recently inherited a rather kluge of a script. ... To multithread this thing I need to enable two processes to copy files from ... Maybe process A pulls from the top of the list and process B pulls from the ...
      (comp.unix.shell)