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)
Hi,
The input file "notifications" contains the following string.
FRTP has 149 missing batches
I want to search for :
FRTP has missing batches
As the number 149 is not important and will change.
The commands I have tried.
grep "FRTP has.*missing batches" notifications.txt... (3 Replies)
Hi All,
Please i need to know the difference between grep, egrep & grep -i when used to serach through a file.
My platform is SunOS 5.9 & i'm using the korn shell.
Regards,
- divroro12 - (2 Replies)
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)
All,
I have a problem with grep/fgrep/egrep. Basically I am building a 200 times 200 correlation matrix. The entries of this matrix need to be retrieved from another very large matrix (~100G). I tried to use the grep/fgrep/egrep to locate each entry and put them into one file. It looks very... (1 Reply)
So a few months ago, I decided to move away from using grep and decided to use egrep in this code that i'm writing.
i figured egrep is more robust than grep.
well, it appears it isn't.
when i used egrep to search the log file for a script that looked like the following, egrep couldn't find... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have a text file.
1) How do I search for x and y?
'Find all lines that contain David and Emily'
2) How do I... (1 Reply)
The $ seems to fail for me. I'm using GNU grep 2.5.4 (that is, nothing out of the ordinary, just what came with my distro) but I can't get the final anchor $ to work for me. (^ works as usual.)
Behavior without anchor:
$ /bin/grep -E 'tium' file
tritium
tertium quid
Expected behavior:
$... (2 Replies)
I have a file like this:
cat file
name = server
jobname = 1010
snapshot_name = funky_Win2k12_20140213210409
I'm trying to use grep to isolate that first line (name = server), but
grep -f "name = " file
as well as
fgrep "name = " file
returns all 3 lines. How do I return... (1 Reply)
I have a source file which is something like :
C/*M/ / ***HMACCT ** MONTH FOR CURRENT MINUS 14 CAL DAY
C/*D/ / ***HMACCT ** DAY FOR CURRENT MINUS 14 CAL DAY
C/*X/ / ***HMACCT ** CENTURY FOR CURRENT MINUS 14 CAL DAY
C/*Y/ / ***HMACCT **... (5 Replies)