Full Discussion: grep vs egrep vs grep -E
Top Forums UNIX for Dummies Questions & Answers grep vs egrep vs grep -E Post 302586825 by vmachava on Tuesday 3rd of January 2012 11:03:02 AM
so what you are saying is grep -E is useful while we are using extended regular expressions.right?
Test Your Knowledge in Computers #193
Difficulty: Easy
Python was selected the Programming Language of the Year in 2007, 2010, and 2018.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers


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)
Discussion started by: whugo
3 Replies

2. Shell Programming and Scripting

egrep/grep result of more files

hi , I'm new at unix bash scripting, im playing a little bit with egrep/grep. I have serveral files and i do a search on those files, like "aki", the result is many rows outcoming and serveral of them are dubble because aki wil come more than ones in a file, how can i get a result that it... (3 Replies)
Discussion started by: tvrman
3 Replies

3. Shell Programming and Scripting

grep/egrep end of pattern

Hi I use arp to get the mac-addresses of my hosts. # arp -a | grep 192.168.0. e1000g0 o 00:00:00:00:00:01 e1000g0 o 00:00:00:00:00:02 e1000g0 ... (12 Replies)
Discussion started by: domi55
12 Replies

4. Shell Programming and Scripting

Ecaping a line feed in grep/egrep

Is it possible to use the escape sequence: \r to match a line feed in grep/egrep? I want to use a regexp that crosses over two lines, and it does not seem to be possible. (1 Reply)
Discussion started by: Enobarbus37
1 Replies

5. UNIX Desktop Questions & Answers

Difference grep, egrep and fgrep

Hi All, 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. Regards, ravi (2 Replies)
Discussion started by: ravind27
2 Replies

6. UNIX for Dummies Questions & Answers

Difference between grep, egrep & grep -i

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)
Discussion started by: divroro12
2 Replies

7. Shell Programming and Scripting

Using grep or egrep

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)
Discussion started by: SkySmart
3 Replies

8. UNIX for Dummies Questions & Answers

egrep / grep login name , logindate from xml

i have an xml file & need to extract two specific tags <loginName> & <lastLogin> for the users. In certain cases if a user has never logged in , the corresponding <lastLogin> tag for a <loginName> tag is absent. Can somebody help me out / guide me on how to go about it. (2 Replies)
Discussion started by: crux123
2 Replies

9. Homework & Coursework Questions

grep and egrep

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)
Discussion started by: ninjagod123
1 Replies

10. Shell Programming and Scripting

grep/egrep fails with $ anchor?

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)
Discussion started by: CRGreathouse
2 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, 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 the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)

Featured Tech Videos

All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy