12-12-2002
Check out the man page on the sort command. You may want to sort first by the last field (to get all the same usernames together) and then use the -um option to sort again for the date/time field. All the oldest entries for each name should be the last (a loop could grap the last entry and send it to your program).
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am new to shell programming, and Unix development overall.
I have a following text file with the following contents:
..
Sunny
Monday: x
Tuesday: x
Wednesday: x
Thursday: x
Friday: x
Cloudy
Monday: x
Tuesday: x
Wednesday: x
... (11 Replies)
Discussion started by: Selma
11 Replies
2. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
3. Shell Programming and Scripting
I am having a "|" delimited flat file and I have to pick up all the records with the 2nd field having null value. Please suggest. (3 Replies)
Discussion started by: dsravan
3 Replies
4. Shell Programming and Scripting
How do you delete and and find duplicate files? (1 Reply)
Discussion started by: Jicom4
1 Replies
5. Shell Programming and Scripting
Hi Unix Guru's
I had generated the uniqe code for every day date ranging from 20000101 to 21990101(200 years alomost 73000 uniqe codes ) and redirected it to text file.
Now My problem is i want to check whether there are any duplicates in unique code not PRESENT in the textfile ?
... (2 Replies)
Discussion started by: Reddy482
2 Replies
6. Shell Programming and Scripting
Hi I have a file with following records
It contains three months of data, some data is duplicated,i need to access the latest data from the duplicate ones.
for e.g; i have foll data
"200","0","","11722","-63","","","","11722","JUL","09"
"200","0","","11722","-63","","","","11722","JUL","09"... (10 Replies)
Discussion started by: vee_789
10 Replies
7. Shell Programming and Scripting
Hi All,
I want someone to modify the below script from this forum so that it can be used for all columns in the file( instead of only printing column 3 mean and standard deviation values). I don't know how to loop around all the columns.
... (3 Replies)
Discussion started by: ks_reddy
3 Replies
8. Shell Programming and Scripting
Hi All
I have a file having columns such as
AAA,BBB,CCC,Aug 13 2013
AAA,BBB,CCC,Aug 11 2013
AAA,BBB,CCC,Aug 12 2013
AAA,BBB,CCC,Aug 13 2013
Now I need to extract the records which are not of todays date (Considering Today date is 13-Aug-2013
So I should get below records... (10 Replies)
Discussion started by: Prashantckc
10 Replies
9. Programming
Hello All,
I have got some assignment to complete till this Monday and problem statement is as follow :-
Problem :- Find duplicate files (especially .c and .cpp) from two project base directories with following requirement :-
1.Should be extendable to search in multiple base... (4 Replies)
Discussion started by: anand.shah
4 Replies
LEARN ABOUT REDHAT
ne_buffer_destroy
NE_BUFFER_DESTROY(3) neon API reference NE_BUFFER_DESTROY(3)
NAME
ne_buffer_destroy, ne_buffer_finish - destroy a buffer object
SYNOPSIS
#include <ne_string.h>
void ne_buffer_destroy (ne_buffer *buf);
char *ne_buffer_finish (ne_buffer *buf);
DESCRIPTION
ne_buffer_destroy frees all memory associated with the buffer. ne_buffer_finish frees the buffer structure, but not the actual string
stored in the buffer, which is returned and must be free()d by the caller.
Any use of the buffer object after calling either of these functions gives undefined behaviour.
RETURN VALUE
ne_buffer_finish returns the malloc-allocated string stored in the buffer.
EXAMPLES
An example use of ne_buffer_finish; the duplicate function returns a string made up of n copies of str:
static char *duplicate(int n, const char *str)
{
ne_buffer *buf = ne_buffer_create();
while (n--) {
ne_buffer_zappend(buf, str);
}
return ne_buffer_finish(buf);
}
SEE ALSO
ne_buffer(3), ne_buffer_create(3), ne_buffer_zappend(3)
AUTHOR
Joe Orton <neon@webdav.org>.
neon 0.23.5 8 October 2002 NE_BUFFER_DESTROY(3)