The files can be any date, it may contain today day or y'day....
i can't hardcode the filenames as filename changes daily with new time stamps...
These 2 files are in /tmp/test folder, i have to compare and get difference in other file like Aggr_New.txt in same folder or any other folder.
Aggr_New_06_15_2013_1944.txt has below records
Aggr_New_06_19_2013_1944.txt has below records
Output:
Last edited by Scott; 07-03-2013 at 05:23 PM..
Reason: Please use code tags for code and data
i have two files and i want to compare these two
it shoud print those lines which are not in 2nd file
a.txt
1236,AB,0
2345,CD,1
5679,EF,1
9123,AA,1
9223,AA,0
b.txt
1234,AB,0
2345,CD,1
5678,EF,1
9123,AA,0
o/p
1236,AB,0
5679,EF,1
9123,AA,1
9223,AA,0 (6 Replies)
File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...
File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2
I have tried several grep, sed, while .. read, do,... (4 Replies)
Hi,
I am trying to find an alternative way to do tkdiff. In tkdiff the gui compares each line and highlights only the differences.
for eg:
John works at McDonalds s(test)
He was playing guitar tywejk
John works in McDonalds 9908
He was playing guitar
I am... (1 Reply)
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Hi,
i have file which contains data as below(Only sample shown, it may contain more data similar to the one shown here)
i need to read this file line by line and generate an output file like the one below
i.e based on N value the number of MSISDNs will vary, if N=1 then the following... (14 Replies)
Hi everybody,
First I apologize if my question seems demasiad you silly, but it really took 4 days struggling with this, I looked at books, forums ... And Also ask help to a friend that is software developer and he told me that it is a bad idea do it by perl... but this is my problem.
I moved to... (8 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
TIMES(3) BSD Library Functions Manual TIMES(3)NAME
times -- process times
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/times.h>
clock_t
times(struct tms *tp);
DESCRIPTION
This interface is obsoleted by getrusage(2) and gettimeofday(2).
The times() function returns the value of time in clock ticks since 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal
Time (UTC).
The number of clock ticks per second may be determined by calling sysconf(3) with the _SC_CLK_TCK request. It is generally (but not always)
between 60 and 1024.
Note that at the common rate of 100 ticks per second on many NetBSD ports, and with a 32-bit unsigned clock_t, this value first wrapped in
1971.
The times() call also fills in the structure pointed to by tp with time-accounting information.
The tms structure is defined as follows:
typedef struct {
clock_t tms_utime;
clock_t tms_stime;
clock_t tms_cutime;
clock_t tms_cstime;
}
The elements of this structure are defined as follows:
tms_utime The CPU time charged for the execution of user instructions.
tms_stime The CPU time charged for execution by the system on behalf of the process.
tms_cutime The sum of the tms_utime s and tms_cutime s of the child processes.
tms_cstime The sum of the tms_stimes and tms_cstimes of the child processes.
All times are measured in clock ticks, as defined above. Note that at 100 ticks per second, and with a 32-bit unsigned clock_t, the values
wrap after 497 days.
The times of a terminated child process are included in the tms_cutime and tms_cstime elements of the parent when one of the wait(2) func-
tions returns the process ID of the terminated child to the parent. If an error occurs, times() returns the value ((clock_t)-1), and sets
errno to indicate the error.
ERRORS
The times() function may fail and set the global variable errno for any of the errors specified for the library routines getrusage(2) and
gettimeofday(2).
SEE ALSO time(1), getrusage(2), gettimeofday(2), wait(2), sysconf(3)STANDARDS
The times() function conforms to ISO/IEC 9945-1:1990 (``POSIX.1'').
BSD June 4, 1993 BSD