Hi,
I am new to Unix and was trying different ways of how to display the list of file names modified between a given date range in sorting order.I will get the fromdate and Todate from the browser, I need to display the list of all the file names that are modified between the given date... (1 Reply)
Hi All,
I want a shell script which can display the file with in the date range.
For Example I have 15 files with the following format
abc_01-01-2009.txt to abc_15-01-2009.txt.
Now I want to have the files between 4th of jan to 12th files.
How can I acheive this.
Advance... (1 Reply)
Hi all,
In Oracle we have got sysdate -1 to find the previous date. Is there any similar way to display date in unix shell scripting?
Kindly help me to display the last five dates from the given date
Thanks,
Geetha (11 Replies)
Need to pull from a range of dates/times (ex. 6:00 AM March 3 through 6:00 AM March 4) from a folder and put those file names in a new file to process later. Dates would not be hard dates but dates from the folder directory, how would I do that? (9 Replies)
Hi guys,
I have been trying to create a list of dates from a certain range, ie.
range from 01011950 to 31122000
But when my below code reaches certain dates, it comes up with a;
'date: invalid date 'yyyy-mm-dd -d 1day'
Sofar I have come up with the following, slow and ugly;
... (4 Replies)
Hi,
I am sure this is simple, but I am breaking my head.
I need 1 page with at the top a range of dates, 2002, 2003, 2004 etc
If you select 2002 it will show the content of 1 div, if you select 2002 the content of another div.
this is for showing announcements on a site, right now there... (1 Reply)
Hi, i am very new to php Is it possible to display Range of date depend on user input day
example:
user input 2 day start from 28/4/12 it will add 2 day from date of input
so display should look like this
28/4/12 to 30/4/12
then from 30/412 user add another 4 date so will... (0 Replies)
I have a data in a file called SCHED which has 5 columns: sched no, date, time, place and remarks. The image is shown below.
http://dl.dropbox.com/u/54949888/Screenshot%20from%202013-01-02%2002%3A42%3A25.png
Now, I want to display only the schedules which fall under a certain date range which... (2 Replies)
Hi Guys,
I want to display lines from Solaris syslog file but with 2 dates range. I have some similar solution (https://www.unix.com/shell-programming-scripting/39293-grep-log-file-between-2-dates-4.html) which works fine but as you know syslog has different date format (Jan 22) so this is not... (1 Reply)
Hi All,
I have 2 dates in mm/dd format.
sdate=10/01 (October 01)
edate=10/10 (October 10)
I need the dates in between these 2 dates like below.
10/01
10/02
10/03
10/04
10/05
10/06
10/07
10/08 (1 Reply)
Discussion started by: jayadanabalan
1 Replies
LEARN ABOUT ULTRIX
lsearch
lsearch(3) Library Functions Manual lsearch(3)Name
lsearch, lfind - linear search and update
Syntax
#include <search.h>
#include <sys/types.h>
void *lsearch (key, base, nelp, width, compar)
void *key;
void *base;
size_t *nelp;
size_t width;
int (*compar)( );
void *lfind (key, base, nelp, width, compar)
void *key;
void *base;
size_t *nelp;
size_t width;
int (*compar)( );
Description
The subroutine is a linear search routine generalized from Knuth (6.1) Algorithm S. It returns a pointer into a table indicating where a
datum may be found. If the datum does not occur, it is added at the end of the table. The key points to the datum to be sought in the ta-
ble. The base points to the first element in the table. The nelp points to an integer containing the current number of elements in the
table. The width is the size of an element in bytes. The integer is incremented if the datum is added to the table. The compar is the
name of the comparison function which the user must supply (strcmp, for example). It is called with two arguments that point to the ele-
ments being compared. The function must return zero if the elements are equal and non-zero otherwise.
The subroutine is the same as lsearch except that if the datum is not found, it is not added to the table. Instead, a NULL pointer is
returned. The pointers to the key and the element at the base of the table should be of type pointer-to-element, and cast to type pointer-
to-character.
The comparison function need not compare every byte, so arbitrary data may be contained in the elements in addition to the values being
compared.
Although declared as type pointer-to-character, the value returned should be cast into type pointer-to-element.
Restrictions
Undefined results can occur if there is not enough room in the table to add a new item.
Return Values
If the searched for datum is found, both and return a pointer to it. Otherwise, returns NULL and returns a pointer to the newly added ele-
ment.
See Alsobsearch(3), hsearch(3), tsearch(3)lsearch(3)