12-24-2009
thnx dude. i tried with fgrep which is killing my major time.how wil be the perfomance of comm command
---------- Post updated at 11:30 PM ---------- Previous update was at 01:17 PM ----------
the command comm -23 new.txt old.txt is faster that fgrep. But the lines are breaking in between ,when the column length is too long
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can I do an and condition with fgrep.
I want to do:
ps -ef | fgrep -f searchvalues > tempmail.file
mailx -s "Email Subject" email@domain.com < tempmail.file
The search values file contains:
opt/bea.*java.*80
mysqld
What I want is to find things that contain:
mysqld OR... (7 Replies)
Discussion started by: jimmy
7 Replies
2. UNIX for Advanced & Expert Users
Hi Guys,
Can anyone explain why I'm getting error below? when I execute in other server there is no error, what could be the reason.
$ fgrep -f timecell.txt ldap_prev.dat
wordlist too large
$ wc -l timecell.txt ldap_prev.dat
372461 timecell.txt
3722878 ldap_prev.dat
Thanks in... (2 Replies)
Discussion started by: krishna
2 Replies
3. Shell Programming and Scripting
Hi all,
I need to transport a number of files from one server to other. I like to ensure the integrity using file checksum values.
The action plan is,
1. create the list of checksum values for all the files using cksum command in source server.
2. Transfer all the files including the file... (5 Replies)
Discussion started by: r_sethu
5 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I need fgrep to search all files in the subdirectories in /var/spool/postfix/defer/...
How can I issue such a command? (3 Replies)
Discussion started by: mojoman
3 Replies
5. Shell Programming and Scripting
Hi,
I know that I can grep desired data to a file but is there a way to add an additional field of data to the output in addition to what is found. I want to add a login id to the data that is found in the grep. Is this even possible? Thanks for your help.
Toni (14 Replies)
Discussion started by: ski
14 Replies
6. Shell Programming and Scripting
How can we use fgrep command to search pattern on perticular field on a file.
eg : I have a parren file having format
cat patternfile
SPA16S199982
SPA5S26330
I want to seach these pattern on FIRST field of File2(since other field has
same data) and that too maching entirely.
... (10 Replies)
Discussion started by: morbid_angel
10 Replies
7. Shell Programming and Scripting
Hi,
I'm struggling a little here, so I figured it's time to ask for help.
I have a file with a list of several hundred IDs (the hit file- "hitfile.txt"), which is newline delimited, and a much bigger (~500Mb) text file, "FASTA.txt" with several thousand entries, delimited by ">". It's the... (8 Replies)
Discussion started by: Tbox
8 Replies
8. Shell Programming and Scripting
Hi ,
Please help me resolve the below issue.
I need to combine the below two command into one.
grep 'ImanItemP' import.report| tr -s ' ' | cut -f2 -d ' ' > tmp.txt
fgrep -v -f tmp.txt input.txt > reuired file.txt
Thanks
Ramesh (4 Replies)
Discussion started by: ramesh12621
4 Replies
9. Shell Programming and Scripting
Is there any equivalent of the below requirement in perl
fgrep -f file1 file2 > file3 (2 Replies)
Discussion started by: aravindj80
2 Replies
10. UNIX for Dummies Questions & Answers
Using the fgrep command with the -v option.
I have two files:
file1:
dog 1
cat 3
bird 5
fish 7file2:
dog
catUsing fgrep -v file2 file1 According to the fgrep man page, the output should be bird5
fish 7 but I can't seem to get it to work. Any help would be appreciated. (2 Replies)
Discussion started by: jimmyf
2 Replies
COMM(1) BSD General Commands Manual COMM(1)
NAME
comm -- select or reject lines common to two files
SYNOPSIS
comm [-123f] file1 file2
DESCRIPTION
The comm utility reads file1 and file2, which should be sorted lexically, and produces three text columns as output: lines only in file1;
lines only in file2; and lines in both files.
The filename ``-'' means the standard input.
The following options are available:
-1 Suppress printing of column 1.
-2 Suppress printing of column 2.
-3 Suppress printing of column 3.
-f Fold case in line comparisons.
Each column will have a number of tab characters prepended to it equal to the number of lower numbered columns that are being printed. For
example, if column number two is being suppressed, lines printed in column number one will not have any tabs preceding them, and lines
printed in column number three will have one.
comm assumes that the files are lexically sorted; all characters participate in line comparisons.
EXIT STATUS
comm exits 0 on success, >0 if an error occurred.
SEE ALSO
cmp(1), diff(1), sort(1), uniq(1)
STANDARDS
The comm utility conforms to IEEE Std 1003.2-1992 (``POSIX.2'').
BSD
June 6, 1993 BSD