Sponsored Content
Top Forums Shell Programming and Scripting Finding files before a certain date with predefined format Post 302578545 by balajesuri on Thursday 1st of December 2011 11:10:42 PM
Old 12-02-2011
Code:
# while read x; do [ `echo $x | sed 's/-//g' | awk '{print $2}'` -lt 20111001 ] && echo $x; done < inputfile
60147850001| 2011-05-05 06:10:19
60147850379| 2011-01-12 16:00:27
60147850484| 2011-01-09 19:56:42
60147850794| 2010-11-23 23:59:59
60147851002| 2010-11-01 23:59:59
60147851046| 2010-11-19 23:59:59
60147851070| 2010-08-31 23:59:59
60147851923| 2010-10-09 23:59:59

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Sort files based on predefined values.?

How to Sort files based on predefined values.? Normally Sorting happens for the alphabetic or numberic orders.. Is there any way to sort a fields based on the Field values..? Field10 has : one two three five four six ten seven eight nine. in predefined order { one, two, three,... (2 Replies)
Discussion started by: p_prathaban
2 Replies

2. Shell Programming and Scripting

convert date format to mysql date format in log file

I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column. I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this? Sample input 02/27/09,23:52:31 02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies

3. Shell Programming and Scripting

Finding files for a date

Hi, I have a directory with files from past 2 years.I need to find all the files for a specific date . Due to certain reasons I could not use this command in my process find . -type f \( -newer /tmp/May-1-2007 -a ! -newer... (4 Replies)
Discussion started by: Raamc
4 Replies

4. Shell Programming and Scripting

Finding files with filename format

hi all, i'm trying to find out how to show files having a particular format. i.e. files o570345.out o5703451.out XX_570345_1.RTF so when i search for files using ls *570345* it shows all three files but actually i don't like to see the second file o5703451.out because 5703451 is... (6 Replies)
Discussion started by: adshocker
6 Replies

5. Shell Programming and Scripting

finding the files based on date..

Hi to every one , i had ascenario like this.. i had path like export/home/pmutv/test/ in this i will recive 43 files daily with each file having that days date i.e like product.sh.20110512 like this i will 43 files every day i had to find the files. if files are avaliable i... (2 Replies)
Discussion started by: apple2685
2 Replies

6. Shell Programming and Scripting

finding date numeral from file and check the validity of date format

hi there I have file names in different format as below triss_20111117_fxcb.csv triss_fxcb_20111117.csv xpnl_hypo_reu_miplvdone_11172011.csv xpnl_hypo_reu_miplvdone_11-17-2011.csv xpnl_hypo_reu_miplvdone_20111117.csv xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Discussion started by: manas_ranjan
10 Replies

7. Shell Programming and Scripting

Finding/Grep on files with date and hour in the file name

Hi, I have a folder structure as follows, DATA -> 2012-01-01 -> 00 -> ABC_2012-01-03_00.txt -> 01 -> ABC_2012-01-03_01.txt -> 02 -> ABC_2012-01-03_02.txt ... -> 23 -> ABC_2012-01-03_02.txt -> 2012-01-02 -> 2012-01-03 So the dir DATA contains the above hierarchy, User input Start and... (6 Replies)
Discussion started by: mihirvora16
6 Replies

8. UNIX for Advanced & Expert Users

Finding/Grep on files with date and hour in the file name

Hi, I have a folder structure as follows, DATA -> 2012-01-01 -> 00 -> ABC_2012-01-03_00.txt -> 01 -> ABC_2012-01-03_01.txt -> 02 -> ABC_2012-01-03_02.txt ... -> 23 -> ABC_2012-01-03_02.txt -> 2012-01-02 ... (1 Reply)
Discussion started by: mihirvora16
1 Replies

9. Shell Programming and Scripting

Finding files and sorting by date (find | awk)

I am wanting to search a directory tree and return files that are older than a specified datetime. So far straight forward with find, now I want to sort in date order and format the output. So far I have this, but is not working and there is a problem with "." in the file and/or path names. ... (2 Replies)
Discussion started by: larry2311
2 Replies

10. UNIX for Dummies Questions & Answers

Rename all Files in a UNIX Directory from one date format to another date format

Hi Unix Gurus, I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Discussion started by: pchegoor
1 Replies
Software::Release(3pm)					User Contributed Perl Documentation				    Software::Release(3pm)

NAME
Software::Release - Object representing a release of software. VERSION
version 0.02 SYNOPSIS
use DateTime; use Software::Release; use Software::Release::Change; my $change = Software::Release::Change->new( author => 'gphat', change_id => 'abc1234', date => DateTime->now, description => 'Frozzled the wozjob' ); my $rel = Software::Release->new( version => '0.1', name => 'Angry Anteater', date => DateTime->now, ); $rel->add_to_changes($change); DESCRIPTION
Software::Release is a purely informational collection of objects that you can use to represent a release of software. Its original use- case was to provide a contract between a git log parser and a formatter class that outputs a changelog, but it may be useful to others to create bug trackers, dashboards or whathaveyour. ATTRIBUTES
changes A list of Software::Release::Change objects for this release. date The date this software was released. name The name of this release. version The version of the release, as a string. METHODS
add_to_changes ($change) Add a change to this release's list of changes. has_no_changes Returns true if this release's list of changes is empty. AUTHOR
Cory G Watson <gphat@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.12.4 2011-10-19 Software::Release(3pm)
All times are GMT -4. The time now is 07:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy