- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- NO IDEA WHERE TO START
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
Forums
Discussions
Discussions
Discussions
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
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
01-18-2011 04:53 AM
01-18-2011 04:53 AM
I need to first find files with the
and then pull the KZ00000002 number to txt file.
below is the two types of data in the files.
can this be done in HP -UX
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2011 05:52 AM
01-18-2011 05:52 AM
Re: NO IDEA WHERE TO START
One good place to start would be putting an accurate description of the problem in the subject line so people will know what to expect when they open your message.
Assuming all htm files are in one directory:
perl -nle 'print $1 if (m{(m{
should do the trick.
Hope that helps.
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2011 06:00 AM
01-18-2011 06:00 AM
Re: NO IDEA WHERE TO START
This is the output.
Search pattern not terminated at -e line 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2011 06:05 AM
01-18-2011 06:05 AM
Re: NO IDEA WHERE TO START
perl -nle 'print $1 if (m{(m{
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2011 06:14 AM
01-18-2011 06:14 AM
SolutionTypo: sorry about that. Bad thing about cutting/pasting from a different window:
perl -nle 'print $1 if ((m{
I had one too many m{'s in there.
the m{} syntax changes the normal search delimiter from / to {}
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2011 06:22 AM
01-18-2011 06:22 AM
Re: NO IDEA WHERE TO START
Looks like you had a typo again. one two few )
This works just fine.
perl -nle 'print $1 if ((m{
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2011 06:24 AM
01-18-2011 06:24 AM
Re: NO IDEA WHERE TO START
perl -nle 'print $1 if ((m{