Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, i have text file that filename contain the date of creation (i.e 2010.05.02.log). I would like to create a script that: -Ask for start date -Ask for end date ...
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    1

    Concatenate file sort by date

    Hello, i have text file that filename contain the date of creation (i.e 2010.05.02.log).
    I would like to create a script that:
    -Ask for start date
    -Ask for end date
    - Concatenate all file on the requested period by date order.

    Any idea how to do it ?

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    where "in" is the name of the file containing, in
    sorted order, all the log files--something like this:

    read date_1;
    read date_2;
    awk '/'$date_1'/,/'$date_2'/ { print $0 }' <in >>out
    the sun is new every day (heraclitus)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...