HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Regarding Regular Exprssin In HP-UX
Operating System - HP-UX
1833949
Members
1763
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
05-21-2007 12:42 AM
05-21-2007 12:42 AM
Regarding Regular Exprssin In HP-UX
Dear all
I want to know what are the regular Exprssion in HP-UX.
with thanx
Bhushan
I want to know what are the regular Exprssion in HP-UX.
with thanx
Bhushan
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2007 12:46 AM
05-21-2007 12:46 AM
Re: Regarding Regular Exprssin In HP-UX
man 5 regexp
Pete
Pete
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2007 12:47 AM
05-21-2007 12:47 AM
Re: Regarding Regular Exprssin In HP-UX
Hi Bhushan,
$ man 5 regexp
PCS
$ man 5 regexp
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2007 07:37 PM
05-21-2007 07:37 PM
Re: Regarding Regular Exprssin In HP-UX
Hi Bhusan,
MANUAL PAGES
As mentioned the manual pages should always give you more information.
It is important to know how to use the online manual pages and to become familiar of using them.
The manual pages in unix is divided into several sections 1,2,3,4,5...
If you do not specify which section to lookup in, the first match in manual pages will be shown.
'man regexp' will show 'man 3 regexp' instead of 'man 5 regexp'
REGEXP
Try to use a dictionary to give you some native language translations. This might help you understand.
A 'regulare expression' is what you write to search for a specific pattern.
Example: /etc/hosts
# My hosts file
192.168.1.122 host_a
#192.168.1.123 old_host_A
168.192.1.122 host_b
example: search for all ip addresses starting with 192 in /etc/hosts
grep '^192' /etc/hosts
the ^192 is the regulare expression
And the ^ tell the grep command to find only lines starting with 192 (from 1'st position)
Output would be:
192.168.1.122 host_a
grep '192' /etc/hosts
regulare expression = 192
This will find all lines in /etc/hosts that contain the string 192 whatever position it has on the line
Output would be:
192.168.1.122 host_a
#192.168.1.123 old_a
168.192.1.122 host_b
/Tor-Arne
MANUAL PAGES
As mentioned the manual pages should always give you more information.
It is important to know how to use the online manual pages and to become familiar of using them.
The manual pages in unix is divided into several sections 1,2,3,4,5...
If you do not specify which section to lookup in, the first match in manual pages will be shown.
'man regexp' will show 'man 3 regexp' instead of 'man 5 regexp'
REGEXP
Try to use a dictionary to give you some native language translations. This might help you understand.
A 'regulare expression' is what you write to search for a specific pattern.
Example: /etc/hosts
# My hosts file
192.168.1.122 host_a
#192.168.1.123 old_host_A
168.192.1.122 host_b
example: search for all ip addresses starting with 192 in /etc/hosts
grep '^192' /etc/hosts
the ^192 is the regulare expression
And the ^ tell the grep command to find only lines starting with 192 (from 1'st position)
Output would be:
192.168.1.122 host_a
grep '192' /etc/hosts
regulare expression = 192
This will find all lines in /etc/hosts that contain the string 192 whatever position it has on the line
Output would be:
192.168.1.122 host_a
#192.168.1.123 old_a
168.192.1.122 host_b
/Tor-Arne
I'm trying to become President of the state I'm in...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP