09-23-2008
Building on shamrock's answer, you could merge this into one line if you're running bash:
comm -12 <(sort file_a) <(sort file_b)
The <( ) construct creates a temporary file out of the output of the command(s) inside the parens.
/fimblo
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
:confused: There is a flat file on my system which contains email addreses of people in my company. This file is utilized when sending notifications for various things. However nobody knows where this file is located or what it is named. The only thing we know is the email address of a user who... (4 Replies)
Discussion started by: kollerj
4 Replies
2. UNIX for Dummies Questions & Answers
I have two files ( eg. file1 and file2 ) , its contents are as below , I want to find out the same content ( same word ) in the two files , in the below example , the same content is "aaa" , could suggest how to do it ? thx.
#vi file1
aaa
bbb
ccc
ddd
#vi file2
111
222
333
aaa (4 Replies)
Discussion started by: ust
4 Replies
3. Shell Programming and Scripting
root 0 0 5 0 11/09/07 08:18
root 0 0 6 0 11/09/07 08:56
root 0 0 7 0 11/22/07 11:09
user1 0 0 8 0 11/08/07 15:58
user2 0 0 9 0 11/30/07 08:37
... (7 Replies)
Discussion started by: ust
7 Replies
4. Shell Programming and Scripting
Hi,
I have to rename all occurance of CUST_MST to RESELLER_MST both in filename and file content under a directory (say D0) which contains multiple (2-3 levels) sub directory.
Example:
D0 -> D1 -> D2 has a file CUST_MST_TEMP.txt
this contains :
> cat /D0/D1/D2/CUST_MST_TEMP.txt... (3 Replies)
Discussion started by: sabyasm
3 Replies
5. AIX
Hi,
I am trying to find the content of file using grep and find command and list only the file names
but i am getting entire file list of files in the directory
find . -exec grep "test" {} \; -ls
Can anyone of you correct this (2 Replies)
Discussion started by: madhu_Jagarapu
2 Replies
6. Shell Programming and Scripting
Hi,
Long list of Input file1 content:
1285_t
4860_i
4817_v
8288_c
9626_a
.
.
.
Long list of Input file2 content:
1285_t chris germany
8288_c steve england
9626_a dave swiss
9260_s stephanie denmark
.
.
. (14 Replies)
Discussion started by: patrick87
14 Replies
7. Shell Programming and Scripting
Hi,
i would like to find 'AppManage' in all files. i have tried the following but it didn't work.
/local/home/mani>grep -iR 'AppManage' *.* - not outcome
/local/home/mani>grep -iR 'AppManage' - this one hangs
thanks (3 Replies)
Discussion started by: lookinginfo
3 Replies
8. Shell Programming and Scripting
Hi All,
I am new to the forum and scripting...Can someone help me with a code..
My input file will be like
$cat first
aa a\b bb\ccccc\ddd
ee*e\fff\ggg
output should be
aa a\
b bb\
ccccc\
ddd
ee*e\
fff\
ggg
I tried with
cat first | awk '{ gsub( /\\/, "/\\/" );... (5 Replies)
Discussion started by: madhanmo
5 Replies
9. Shell Programming and Scripting
I have two files named Before.txt and After.txt:
Now i want to find the difference in content between <Marker 1> and <Marker 2> in the two files.
---------- Post updated at 05:00 PM ---------- Previous update was at 04:50 PM ----------
Any help will be highly appreciated..:) (3 Replies)
Discussion started by: proactiveaditya
3 Replies
10. UNIX for Dummies Questions & Answers
This should recursively walk through all dirictories and
search for a specified string in all present files, if found
output manicured content (eg some regex) with CAT into
a specified directory (eg /tmp/)
one by one, keeping the original names
This is what I have so far, which seems to... (1 Reply)
Discussion started by: lowmaster
1 Replies
LEARN ABOUT CENTOS
cms_uncompress
CMS_uncompress(3) OpenSSL CMS_uncompress(3)
NAME
CMS_uncompress - uncompress a CMS CompressedData structure
SYNOPSIS
#include <openssl/cms.h>
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags);
DESCRIPTION
CMS_uncompress() extracts and uncompresses the content from a CMS CompressedData structure cms. data is a BIO to write the content to and
flags is an optional set of flags.
The dcont parameter is used in the rare case where the compressed content is detached. It will normally be set to NULL.
NOTES
The only currently supported compression algorithm is zlib: if the structure indicates the use of any other algorithm an error is returned.
If zlib support is not compiled into OpenSSL then CMS_uncompress() will always return an error.
The following flags can be passed in the flags parameter.
If the CMS_TEXT flag is set MIME headers for type text/plain are deleted from the content. If the content is not of type text/plain then an
error is returned.
RETURN VALUES
CMS_uncompress() returns either 1 for success or 0 for failure. The error can be obtained from ERR_get_error(3)
BUGS
The lack of single pass processing and the need to hold all data in memory as mentioned in CMS_verify() also applies to CMS_decompress().
SEE ALSO
ERR_get_error(3), CMS_compress(3)
HISTORY
CMS_uncompress() was added to OpenSSL 0.9.8
1.0.1e 2013-02-11 CMS_uncompress(3)