Sponsored Content
Full Discussion: grep with date
Top Forums Shell Programming and Scripting grep with date Post 302580744 by verdepollo on Friday 9th of December 2011 12:31:01 PM
Old 12-09-2011
Keep in mind that the creation time is not really stored in the inode so you may get false positives.

Files that were created somewhere in the past but were modified today will also match your search criteria.
This User Gave Thanks to verdepollo For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ls -l | grep $date (failing)

Example file list > ls -l -rwxr-xr-x 1 ....... ...... 1707 Feb 5 2004 file1 -rwxr-xr-x 1 ....... ...... 175 Jan 21 2005 file2 -rwxr-xr-x 1 ....... ...... 95 Apr 1 16:15 file3 The Script #!/bin/ksh # date variables start_date_Y=`date +%Y` # year (ie:... (1 Reply)
Discussion started by: yongho
1 Replies

2. Shell Programming and Scripting

grep for date in file

Hi, i have a script that stores the date in a variable as follows: DATESTAMP=`date +"%m%d%Y"` I also have another file called HOLIDAYFILE which stores all of our holidays as follows: 01/01/2007 07/04/2007 What i need to do is use the grep statement in my script to see if DATESTAMP... (2 Replies)
Discussion started by: scabral
2 Replies

3. Shell Programming and Scripting

grep using date format

i have a process ruuning root 843786 835648 0 Nov 10 - 0:31 java root 860340 1 0 Nov 11 - 0:31 then how to grep this using date above i have written a script ---------------------------- #!/bin/ksh a=`date +"%m-%d"` ps | grep root | grep "$a" >> file1... (8 Replies)
Discussion started by: ali560045
8 Replies

4. Shell Programming and Scripting

grep time and date

Hi, I have a file which is a result of a script running every two minutes. What I wanted to do is to grep a specific date and time (hour and minute) from the file and then count the occurance of 201. I need to get the result of occurance of 201 every 5 minutes. What should I include in my... (8 Replies)
Discussion started by: ayhanne
8 Replies

5. Shell Programming and Scripting

Grep date from ls -l

I have a script which required the month and day as the input ex : ./script <Month> <date> from this I get the list of files to do further logics. The problem is when I assign these $1 and $2 to variables, and use grep command in the script ls -l |grep "$1 $2" it works fine for two... (1 Reply)
Discussion started by: GenMen
1 Replies

6. Shell Programming and Scripting

grep tomorrow's date

Hi guys, I need to find tomorrows date in date fomat and should be in variable. as I need to grep this date in a flat file ie. if today's date is '09 JAN 2009' output should be '10 JAN 2009' unix/perl script will be fine. (21 Replies)
Discussion started by: ssachins
21 Replies

7. Shell Programming and Scripting

grep based on date

Hello! I have a circular log file which contains data that looks like this: 01/23/09 08:24:19:04 treadle_data = L3^M 01/23/09 08:24:19:09 STRIP 3 LOW 01/23/09 08:24:19:09 treadle_data = L4^M 01/23/09 08:24:19:09 STRIP 4 LOW 01/23/09 08:24:19:09 treadle_data = FF^M 01/23/09 08:24:19:09... (8 Replies)
Discussion started by: sdilucca
8 Replies

8. Shell Programming and Scripting

grep problem with date

Hi, can you correct the below syntax for me? echo `grep "Issue" new`date +'%y%m%d'`.csv` I am not able to execute above. PS: "Issue" is a keyword I am seraching in a new<date>.csv I am going to use above in i statement as below: if then do this else do that (2 Replies)
Discussion started by: amit.mathur08
2 Replies

9. Shell Programming and Scripting

Calculating expiry date using date,sed,grep

Hi, I would greatly appreciate it if someone can help me with my problem. I have a crawler which collects spam URLs everyday & this data needs to be published in a blacklist. Here's the catch: The "Time To Live" (TTL) for each URL is 3 months (or whatever for that matter). If i see the... (5 Replies)
Discussion started by: r4v3n
5 Replies

10. UNIX for Dummies Questions & Answers

Grep using date issue

I'm using the below to grep two strings from my log file. grep "09:49.*yellow" out.logNow, i wish to search for all times within 3 minutes of the greped time i.e All time starting from 09:49:00 to 09:51:00. Currently it searches only for 09:49:* and also searches incorrect entry like... (14 Replies)
Discussion started by: mohtashims
14 Replies
ldi_prop_get_int(9F)					   Kernel Functions for Drivers 				      ldi_prop_get_int(9F)

NAME
ldi_prop_get_int, ldi_prop_get_int64 - Lookup integer property SYNOPSIS
#include <sys/sunldi.h> int ldi_prop_get_int(ldi_handle_t lh, uint_t flags, char *name, int defvalue); int64_t ldi_prop_get_int64(ldi_handle_t lh, uint_t flags, char *name, int64_t defvalue); PARAMETERS
lh Layered handle. flags Possible flag values are some combination of: LDI_DEV_T_ANY Match the lookup request independent of the actual dev_t value that was used when the property was created. Indicates any dev_t value (including DDI_DEV_T_NONE) associated with a possible property match satisfies the matching criteria. DDI_PROP_DONTPASS Do not pass request to parent device information node if property not found. DDI_PROP_NOTPROM Do not look at PROM properties (ignored on platforms that do not support PROM properties). name String containing the property name. defvalue Integer value that is returned if the property is not found. INTERFACE LEVEL
Solaris DDI specific (Solaris DDI) DESCRIPTION
The ldi_prop_get_int() and ldi_prop_get_int64() functions search for an integer property associated with a device represented by the lay- ered driver handle. If the integer property is found, the functions return the property value. Properties are searched for based on the dip and dev_t values associated with the layered handle, the property name, and type of the data (integer). The property search order is as follows: 1. Search software properties created by the driver. 2. Search the software properties created by the system (or nexus nodes in the device info tree). 3. Search the driver global properties list. 4. If DDI_PROP_NOTPROM is not set, search the PROM properties (if they exist). 5. If DDI_PROP_DONTPASS is not set, pass this request to the parent device information node of the device represented by the layered han- dle. 6. Return defvalue. Typically, the specific dev_t value associated with the device represented by the layered handle (ldi_handle_t) is used as a part of the property match criteria. This association is handled by the layered driver infrastructure on behalf of the consumers of the ldi property look up functions. However, if the LDI_DEV_T_ANY flag is used, the ldi property lookup functions match the request regardless of the dev_t value associated with the property at the time of its creation. If a property was created with a dev_t set to DDI_DEV_T_NONE, the only way to look up this property is with the LDI_DEV_T_ANY flag. PROM properties are always created with a dev_t set to DDI_DEV_T_NONE. name must always be set to the name of the property being looked up. The return value of the routine is the value of property. If the property is not found, the argument defvalue is returned as the property value. ldi_prop_get_int64() does not search the PROM for 64-bit property values. RETURN VALUES
ldi_prop_get_int() and ldi_prop_get_int64() return the property value. If the property is not found, the argument defvalue is returned. If the property is found, but cannot be decoded into an int or an int64_t, DDI_PROP_NOT_FOUND is returned. CONTEXT
ldi_prop_get_int() and ldi_prop_get_int64() can be called from user or kernel context. EXAMPLES
Using ldi_prop_get_int64(). The following example demonstrates the use of ldi_prop_get_int64(). /* * Get the value of the integer "timeout" property, using * our own default if no such property exists */ int64_t timeout, defval; timeout = ldi_prop_get_int64(lh, LDI_DEV_T_ANY|DDI_PROP_DONTPASS, propname, defval); SEE ALSO
ddi_prop_get_int(9F), ddi_prop_get_int64(9F), ldi_prop_exists(9F). Writing Device Drivers SunOS 5.10 3 June 2003 ldi_prop_get_int(9F)
All times are GMT -4. The time now is 12:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy