10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Using the fgrep command with the -v option.
I have two files:
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. Shell Programming and Scripting
I have a file like this:
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)
Discussion started by: ampsys
3. Shell Programming and Scripting
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
Ramesh (4 Replies)
Discussion started by: ramesh12621
4. Shell Programming and Scripting
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)
Discussion started by: realwindfly
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
I have 2 files new.txt and old.txt
The key column in both files are first column itself.
I want to get records in... (6 Replies)
Discussion started by: morbid_angel
7. UNIX Desktop Questions & Answers
Can anyone please explain me the difference between grep, egrep and fgrep with examples.
I am new to unix environment.. Your help is highly appreciated.
ravi (2 Replies)
Discussion started by: ravind27
8. UNIX for Dummies Questions & Answers
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
9. Shell Programming and Scripting
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
10. UNIX for Advanced & Expert Users
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
Thanks in... (2 Replies)
Discussion started by: krishna
GZGREP(1) General Commands Manual GZGREP(1)
gzgrep, gzegrep, gzfgrep - search possibly compressed files for a regular expression
gzgrep [ grep_options ] [ -e ] pattern filename...
gzgrep is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci-
fied, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and
fed to grep.
If gzgrep is invoked as gzegrep or gzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, gzgrep
uses it as the grep program to be invoked. For example:
for sh: GREP=fgrep gzgrep string files
for csh: (setenv GREP fgrep; gzgrep string files)
Charles Levert (firstname.lastname@example.org)
grep(1), egrep(1), fgrep(1), gzdiff(1), gzmore(1), gznew(1), gzforce(1), gzip(1), gzexe(1)
See attributes(5) for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability | SUNWgzip |
|Interface Stability | External |
Source for gzip is available in the SUNWgzipS package.