Sponsored Content
Top Forums Shell Programming and Scripting reading files for specific dates Post 51991 by siva_jm on Monday 7th of June 2004 04:09:15 PM
Old 06-07-2004
reading files for specific dates

assume files are in a directory

/data

$ ls -ltr
Just displaying Data and file name:
01/01/2004 file_3434_typea.dat
01/01/2004 file_3423_typea.dat
01/01/2004 file_3436_typea.dat
01/01/2004 file_3434_typeb.dat
01/01/2004 file_3423_typeb.dat
01/01/2004 file_3436_typeb.dat
01/02/2004 file_3423_typea.dat
01/02/2004 file_3434_typea.dat
01/02/2004 file_3423_typea.dat

inside the file it just has the counts (a log file)

how do i look for files for a particuler date (01/01/2004) and files of type (file-*typea) etc.

thanks for any help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to calculate specific hours between 2 dates

Hi there, I am trying to find out a way to calculate how many hours are between 2 dates but from a specific time range, actually working hours (Monday to Friday 09:00 - 18:00). What I mean is for example date1 = Monday 21 July 2008 22:00:00 so in python 2008-07-21 22:00:00 date2 = Wednesday... (5 Replies)
Discussion started by: sickboy
5 Replies

2. Shell Programming and Scripting

Reading specific contents from 1 input files and appending it to another input file

Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies

3. UNIX for Dummies Questions & Answers

To find files with specific dates and cp another folder.

Hi all, We have an existing script: find /u03/oraprod/perpcomn/admin/out -type f -ctime +7 \ -exec cp {} "/u08/oraprod/backup/cout" \; Which is to find all files more than 7 days and copy to another folder. However I would like to only list files with Sep 29, and cp to another folder. ... (2 Replies)
Discussion started by: *Jess*
2 Replies

4. Shell Programming and Scripting

Parsing log files, displaying logs between specific dates

Sorry, couldn't really think of a simple subject/title. So, I have a log file, and the dates are displayed like so: 2009-03-05 02:49:44 So the first and second field are the date/time. I can change them into a unix timestamp easily with: date -d "2009-03-05 02:49:44" +%s However,... (17 Replies)
Discussion started by: Rhije
17 Replies

5. Shell Programming and Scripting

Reading text file and comparing the dates in Kshell

I have a text file in which holidays are listed as YYYYMMDD. Here is the sample data of the file. 20090911 20090912 20090913 I need to read this file and see if the current day is listed in this text file. If today and any of the rows in my text file match, I need to do further... (2 Replies)
Discussion started by: Pramodini Rode
2 Replies

6. Shell Programming and Scripting

Question on reading dates in folders/files

Hi All, I have some folder that are named "FOLDERYYYYMM". I'm trying to piece together a .sh script that will look for the folder with the date. How can I get shell to see the date? (3 Replies)
Discussion started by: bbbngowc
3 Replies

7. UNIX for Dummies Questions & Answers

[bash] Reading two files and change a specific field

Hi all. I have 2 files like these: file1 3 -2 5 4 . . . 3 3 3 4 . . . 2 2 3 4 . . . 3 -2 8 4 . . . file2 0.4242 2 3 4 . . . 2.562 7 3 4 . . . 0.7242 5 5 4 . ... (3 Replies)
Discussion started by: t_studen_t
3 Replies

8. UNIX for Dummies Questions & Answers

Reading the dates from a file & moving the files from a directory

Hi All, I am coding for a requirement where I need to read a file & get the values of SUB_DATE. Once the dates are found, i need to move the files based on these dates from one directory to another. ie, this is how it will be in the file, SUB_DATE = 20120608,20120607,20120606,20120606... (5 Replies)
Discussion started by: dsfreddie
5 Replies

9. Shell Programming and Scripting

How to compare two dates in a specific format ?

Hello, I am not able to find how to compare two dates in '%Y-%m-%d %H:%M:%S,%3N' format i have to two dates as below date1="2016-08-24 09:47:40,444" date2="2016-08-24 10:45:40,567" how to compare these two dates ? I have tried below without success if ; then echo 'yes'; fi ... (6 Replies)
Discussion started by: Ramneekgupta91
6 Replies

10. Red Hat

Moving files with specific dates

Hi, These are the list of files in one directory in the server : # ls -lrt total 10120 -rw-r--r-- 1 root root 4484 Jul 8 2011 install.log.syslog -rw-r--r-- 1 root root 51890 Jul 8 2011 install.log -rw------- 1 root root 3140 Jul 8 2011 anaconda-ks.cfg drwxr-xr-x 2 root root... (2 Replies)
Discussion started by: anaigini45
2 Replies
dat.conf(4)							   File Formats 						       dat.conf(4)

NAME
dat.conf - DAT static registry SYNOPSIS
/etc/dat/dat.conf DESCRIPTION
The DAT static registry, /etc/dat/dat.conf is a system-wide data resource maintained by the system administrative command datadm(1M). /etc/dat/dat.conf contains a list of interface adapters supported by uDAPL service providers. An interface adapter on Infiniband (IB) cor- responds to an IPoIB device instance, for example, ibd0. An IPoIB device name represents an IP interface plumbed by ifconfig(1M) on an IB partition/Host Channel Adapter port combination. Each entry in the DAT static registry is a single line that contains eight fields. Fields are separated by a SPACE. Lines that begin with a pound sign (#) are considered comments. All characters that follow the # are ignored. Enclose Solaris specific strings (Solaris_spe- cific_string) and service provider's instance data (service _provider_instance_data) in quotes. The following shows the order of the fields in a dat.conf entry: "interface_adapter_name" "API_version" "threadsafe | nonthreadsafe" "default | nondefault" "service_provider_library_pathname" "service_provider_version" "service _provider_instance_data" "Solaris_specific_string" The fields are defined as follows: interface_adapter_name Specifies the Interface Adapter (IA) name. In IB, this is the IPoIB device instance name, for example, ibd0. This represents an IP interface plumbed on an IB partition/port combination of the HCA. API_version Specifies the API version of the service provide library: For example, "u"major.minor is u1.2. threadsafe | nonthreadsafe Specifies a threadsafe or non-threadsafe library. default | nondefault Specifies a default or non-default version of library. A service provider can offer several versions of the library. If so, one version is designated as default with the rest as nondefault. service_provider_library_pathname Specifies the pathname of the library image. service_provider_version Specifies the version of the service provider. By convention, specify the company stock symbol as the service provider, followed by major and minor version numbers, for example, SUNW1.0. service _provider_instance_data Specifies the service provider instance data. Solaris_specific_string Specifies a platform specific string, for example, the device name in the service_provider.conf file. EXAMPLES
Example 1 Sample dat.conf File The following dat.conf file shows a uDAPL 1.2 service provider for tavor, udapl_tavor.so.1 supporting two interfaces, ibd0 and ibd1: # # dat.conf for uDAPL 1.2 # ibd0 u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 "" "driver_name=tavor" ibd1 u1.2 nonthreadsafe default udapl_tavor.so.1 SUNW.1.0 "" "driver_name=tavor" ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWudaplr | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
datadm(1M), ifconfig(1M), libdat(3LIB), service_provider.conf(4), attributes(5) NOTES
An empty dat.conf is created during the package SUNWudaplr installation if no file is present beforehand. Entries in the file are added or removed by running datadm(1M). The content of the platform specific string does not constitute an API. It is generated by datadm(1M) and might have a different content or interpretation in a future release. SunOS 5.11 18 Jun 2004 dat.conf(4)
All times are GMT -4. The time now is 03:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy