- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Difference between grep and egrep
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 08:28 AM
тАО07-15-2002 08:28 AM
I???d like to kow the meaning of this code lines,
Why it is using ???egrep??? instead of grep?
......................................
#Runs the utility in report mode
xsm_check_erregistrations -r 0 > /tmp/log 2>&1
if [ ! -a /tmp/log ]
then
#no stale registrations
exit 0
fi
stalereglist='egrep "Stale ER Client:" /tmp/log | awk -F ":" '[print $4]''
.............................................
What is, in general, the difference between grep and egrep?
Regards, Angelo Trenta
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 08:31 AM
тАО07-15-2002 08:31 AM
Re: Difference between grep and egrep
egrep is maintained for backward compatibility. It has been replaced with the -E option of grep (for Extended regular expressions).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 08:33 AM
тАО07-15-2002 08:33 AM
Re: Difference between grep and egrep
Man grep for more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 08:34 AM
тАО07-15-2002 08:34 AM
Re: Difference between grep and egrep
grep is used to search for a single pattern
ex: grep
whereas egrep searches multiple expression at a time
ex: egrep '
in ur case it is searching any of Stale ER or Client.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 08:35 AM
тАО07-15-2002 08:35 AM
Re: Difference between grep and egrep
'egrep' stands for "extended" grep. If you use the '-E' option of 'grep' you will achieve the same functionality. Similarly, the '-F' option of 'grep' yields fixed-string searches in lieu of using 'fgrep'. See the man pages for 'grep' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2002 08:44 AM
тАО07-15-2002 08:44 AM
SolutionYou may like to look at this
:http://www.ntlug.org/archive/tp/shell_ccox/img8.htm
Manoj Srivastava