03-14-2010
common contents of two files
I have two files: file a with contents
1
2
3
4
5
file b with contents
6
3
5
8
9
10
i want go get file c which has the common contents of both files
so file c should have contents
3
5
Thank you
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hican anyone tell how to list all files starting with "abc" only specific month like august .thanks,Mazhar (4 Replies)
Discussion started by: mazhar99
4 Replies
2. Shell Programming and Scripting
I have 2 files with a common parm - Jobname
File 1
0507 1202 JOBA
0507 1302 JOBB
0507 1452 JOBC
0507 1552 JOBA
0507 1553 JOBA
File2
JOBA abcdefg server4
JOBB defghij server22
JOBC vwxyz12 server55
I would like to take each line from File1 and match the jobname with the jobname... (8 Replies)
Discussion started by: Northerner
8 Replies
3. Shell Programming and Scripting
hi,
i am facing a problem in merging two files using awk,
the problem is as stated below,
file1:
A|B|C|D|E|F|G|H|I|1
M|N|O|P|Q|R|S|T|U|2
AA|BB|CC|DD|EE|FF|GG|HH|II|1
....
....
....
file2 :
1|Mn|op|qr (2 Replies)
Discussion started by: shashi1982
2 Replies
4. Shell Programming and Scripting
I have 3 files
1.csv
abc
def
2.csv
abc
xyb
3.csv
abc
e23
frw
I need to search for the common word in all the three files. How do i do that in awk ? (10 Replies)
Discussion started by: nuthalapati
10 Replies
5. Shell Programming and Scripting
Hello guys,
I need a script to get the common lines from two files with a criteria that if the first two columns match then I keep the maximum value of the 5th column.(tab separated columns) . 3rd and 4th columns corresponds to the row which has highest value for the 5th column.
Sample... (2 Replies)
Discussion started by: jaysean
2 Replies
6. Shell Programming and Scripting
I have 3 files which are tab delimited and have numbers in it.
file 1
1
2
3
4
5
6
7
File 2
3
5
7
8
File 3
1 (4 Replies)
Discussion started by: Lucky Ali
4 Replies
7. Shell Programming and Scripting
I have this code
awk 'NR==FNR{a=$1;next} a' file1 file2
which does what I need it to do, but for only two files. I want to make it so that I can have multiple files (for example 30) and the code will return only the items that are in every single one of those files and ignore the ones... (7 Replies)
Discussion started by: castrojc
7 Replies
8. Shell Programming and Scripting
Hallo Team,
I have 2 .csv files file A has 47600 lines and file B has 67000 lines
FILEA
SD0o9rb01-1d320ddbcc8d220f572739ebed5f58d1-v300g00
SD8bt0101-a0810bfe0e3396060126ec51b30dac0a-v300g00
SD05sce01-cb056af347ed4651f29eb3c3e9addbd6-v300g00... (3 Replies)
Discussion started by: kekanap
3 Replies
9. Shell Programming and Scripting
Hello there:
I want to find common among files. They all have one column.
Format for data:
CEU_snp_CHR21.txt
21:10758305
21:10827533
21:10913441
21:10920098
21:10952160
21:10966322
21:10985991
NAT_CHR21_variants.txt
21:10971951 (3 Replies)
Discussion started by: genome
3 Replies
10. UNIX for Beginners Questions & Answers
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
LEARN ABOUT LINUX
elfdump
elfdump(1) User Commands elfdump(1)
NAME
elfdump - dumps selected parts of an object file
SYNOPSIS
elfdump [-cCdegGhHiklmnprsuvy] [-N name] [-w file] filename...
DESCRIPTION
The elfdump utility symbolically dumps selected parts of the specified object file(s). The options allow specific portions of the file to
be displayed.
The elfdump utility is similar in function to the dump(1) utility. The dump utility offers an older and less user-friendly interface than
elfdump, although dump might be more appropriate for certain uses such as in shell scripts.
Archive files, produced by ar(1), can also be inspected with elfdump. In this case, each object within the archive is processed using the
options supplied.
For a complete description of the displayed information, refer to the Linker and Libraries Guide.
OPTIONS
The following options are supported:
-c Dumps section header information.
-C Demangles C++ symbol names.
-d Dumps the contents of the .dynamic section.
-e Dumps the ELF header.
-g Dumps the contents of the .group section.
-G Dumps the contents of the .got section.
-h Dumps the contents of the .hash section.
-H Dumps the contents of the .SUNW_cap hardware and software capabilities section.
-i Dumps the contents of the .interp section.
-k Calculates the ELF checksum. See gelf_checksum(3ELF).
-l Displays long section names without truncation.
-m Dumps the contents of the .SUNW_move section.
-n Dumps the contents of the .note section.
-N name Qualifies an option with a specific name. For example, in a file that contains more than one symbol table, the .dynsym ta-
ble can be displayed using:
example% elfdump -s -N .dynsym filename
-p Dumps the program headers.
-r Dumps the contents of the .rel[a] relocation sections.
-s Dumps the contents of the .dynsym and .symtab symbol table sections. For archives, the archive symbol table is also dumped.
Individual sections can be specified with the -N option. An archive symbol table can be specified using the special section
name -N ARSYM.
In the case of core files, the shndx field will have the value "unknown" since the field does not contain the valid values.
In addition to the standard symbol table information, the version definition index of the symbol is also provided under the
ver heading.
-u Dumps the contents of a frame unwind.
-v Dumps the contents of the .SUNW_version version sections.
-w file Writes the contents of a section that is specified with the -N option, to the named file. For example, extracting the .text
section of a file can be carried out with:
example% elfdump -w text.out -N .text filename
-y Dumps the contents of the .SUNW_syminfo section.
OPERANDS
The following operand is supported:
filename The name of the specified object file.
FILES
liblddbg.so linker debugging library
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWbtool |
+-----------------------------+-----------------------------+
|Interface Stability |Stable |
+-----------------------------+-----------------------------+
SEE ALSO
ar(1), dump(1), nm(1), pvs(1), elf(3ELF), attributes(5)
Linker and Libraries Guide
SunOS 5.10 4 Oct 2004 elfdump(1)