04-18-2007
Hi Vgersh,
Thanks for your response. But the code
sum[$1 FS $2 FS $3 FS $4 FS $5] will compare fields from 1 to 5.
I need to comapre fields from 2 to 5 and aggregate, while printing i should print the first field also. The first field can be anyone within the matching lines (lines having similar value from 2nd to 5th coulmn)
23ASIA|VODAFONE ES|5484|000000000000314521|03/31/07|1|100
56NA|VODAFONE ES|5484|000000000000314521|03/31/07|1|200
then the output should be
either 23ASIA|VODAFONE ES|5484|000000000000314521|03/31/07|1|300
OR 56NA|VODAFONE ES|5484|000000000000314521|03/31/07|1|300
can we acheive this?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
pls help me by providing soln for my problem
I'm having a text file which contains duplicate records .
Example:
abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
tas 3420 3562 ... (1 Reply)
Discussion started by: G.Aavudai
1 Replies
2. Shell Programming and Scripting
Dear All,
I have one file which looks like :
account1:passwd1
account2:passwd2
account3:passwd3
account1:passwd4
account5:passwd5
account6:passwd6
you can see there're two records for account1. and is there any shell command which can find out : account1 is the duplicate record in... (3 Replies)
Discussion started by: tiger2000
3 Replies
3. Shell Programming and Scripting
Hi,
I've a file like below:
DeptFile.csv
DeptID EmpID
------- ------
Dep01 Emp01
Dep01 Emp02
Dep01 Emp03
Dep02 Emp04
Dep02 Emp05
I've another file which has
EmpFile.csv
EmpID Salary
------ ------ (3 Replies)
Discussion started by: Matrix2682
3 Replies
4. Shell Programming and Scripting
hi,
I have records like this
D127@dm.com,127,569,BRAD,25/08/2009 23:59
D127@dm.com,127,569,BRAD,25/08/2009 23:59
D159@dm.com,159,1170,DAVE,25/08/2009 23:59
D159@dm.com,159,1181,HALE,25/08/2009 23:59
D393@dm.com,393,1209,CAPIT,25/08/2009 23:59
D457@dm.com,457,571,NORTT,25/08/2009 23:59... (4 Replies)
Discussion started by: trichyselva
4 Replies
5. Shell Programming and Scripting
Hi,
Need to find a duplicate records on the first column,
ANU4501710430989 0000000W20389390
ANU4501710430989 0000000W67065483
ANU4501130050520 0000000W80838713
ANU4501210170685 0000000W69246611... (3 Replies)
Discussion started by: Murugesh
3 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
i have one file contains 20 records
1
2
-
-
-
20
i want to find 5th records and 8th records and 14th
plz tell me which command use?
Thanks to advance (4 Replies)
Discussion started by: venkatreddy
4 Replies
7. UNIX for Dummies Questions & Answers
Hi Unix gurus,
Maybe it is too much to ask for but please take a moment and help me out. A very humble request to you gurus. I'm new to Unix and I have started learning Unix. I have this project which is way to advanced for me.
File format: CSV file
File has four columns with no header... (8 Replies)
Discussion started by: arvindosu
8 Replies
8. UNIX for Dummies Questions & Answers
Hi,
jar -tvf tools.jar | grep LinkInfoImpl
Output:
4968 Fri Feb 22 02:34:52 EST 2008 com/sun/tools/doclets/formats/html/LinkInfoImpl.class
However, i need the similar output for all jar files under /apps/lib/ directory and its subdirectories.
Can you please help format my command to... (3 Replies)
Discussion started by: mohtashims
3 Replies
9. Shell Programming and Scripting
I have a file with the following format:
X|High|2|GIC|DM||XHM|||6 Months
X|Moderate|2|GIC|DM||XHM|||6 Months
X|High|2|GCM|DM||XSF|||6 Months
X|Med|2|GCM|DM||XSF|||6
Here there are ten columns but I need to print rows having blank records in any of the rows (except for 6th,8th and 9th... (10 Replies)
Discussion started by: chatwithsaurav
10 Replies
10. Shell Programming and Scripting
Hi All,
I am using RHEL 6.9. I got a requirement to group the records in a file.The file content as shown below.
#### FAILED JOBS IN XXX #####
1> ABCD failed in the project XXX
2> HJK Job is in compiled state in the project XXX
3> ILKD failed in the project XXX
4> DFG failed in the... (5 Replies)
Discussion started by: ginrkf
5 Replies
LEARN ABOUT DEBIAN
srec_tektronix
srec_tektronix(5) File Formats Manual srec_tektronix(5)
NAME
srec_tektronix - Tektronix hexadecimal file format
DESCRIPTION
The Tektronix hexadecimal file format is no longer very common. It serves a similar purpose to the Motorola and Intel formats, usually
used to transfer data into EPROM programmers.
The Lines
Most Tektronix hex files contain only Tektronix hex lines (see the next section), which always start with a slash ("/[rq]) character.
There are only two types of lines - data lines and a termination line.
Data Lines
Data lines have five fields: address, length, checksum 1, data and checksum 2. The lines always start with a slash ("/[rq]) character.
+--+---------+--------+-----------+------+-----------+
|/ | Address | Length | Checksum1 | Data | Checksum2 |
+--+---------+--------+-----------+------+-----------+
Address This is a 4 character (2 byte) address that specifies where the data in the record is to be loaded into memory.
Data Length
The data length field is a 2 character (1 byte) field that specifies the number of character pairs (bytes) in the data field. This
field never has a value of zero.
Checksum 1
The checksum 1 field is a 2 character (1 byte) field. Its value is the 8-bit sum of the six 4-bit values which make up the address
and length fields.
Data The data field contains character pairs (bytes); the number of character pairs (bytes) is indicated by the length field.
Checksum 2
The checksum 2 field is a 2 character (1 byte) field. Its value is the least significant byte of the sum of the all the 4-bit val-
ues of the data field.
Termination Line
Termination lines have three fields: address, zero and checksum. The lines always start with a slash ("/[rq]) character.
+--+---------+------+----------+
|/ | Address | Zero | Checksum |
+--+---------+------+----------+
Address This is a 4 character (2 byte) address that specifies where to begin execution.
Zero The data length field is a 2 character (1 byte) field of value zero.
Checksum
The checksum 1 field is a 2 character (1 byte) field. Its value is the 8-bit sum of the six 4-bit values which make up the address
and zero fields.
Size Multiplier
In general, binary data will expand in sized by approximately 2.4 times when represented with this format.
EXAMPLE
Here is an example Tektronix hex file. It contains the data "Hello, World[rq] to be loaded at address 0.
/00000D0D48656C6C6F2C20576F726C640A52
/00000000
COPYRIGHT
srec_cat version 1.58
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Peter Miller
The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_cat -VERSion License' command. This is free software and
you are welcome to redistribute it under certain conditions; for details use the 'srec_cat -VERSion License' command.
AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au
//* WWW: http://miller.emu.id.au/pmiller/
Reference Manual SRecord srec_tektronix(5)