- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Help with scripting issue ...
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
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
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
08-23-2011 08:06 AM
08-23-2011 08:06 AM
I am issuing a setboot command to capture my Primary and Secondary boot devices which I am interested in the following lines:
Primary bootpath : 0/0/0/2/0/0/0.0x0.0x1010000c0000000 (/dev/rdisk/disk2)
HA Alternate bootpath : 0/0/0/2/0/0/0.0x0.0x1000000c0000000 (/dev/rdisk/disk3)
From this is there a way in a script to pick out just the 'disk2' and 'disk3' from each line ??
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2011 08:19 AM
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2011 09:37 AM
08-23-2011 09:37 AM
Re: Help with scripting issue ...
nks you, I never think about using perl....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2011 09:56 AM
08-23-2011 09:56 AM
Re: Help with scripting issue ...
Hi (again):
@MikeL_4 wrote:nks you, I never think about using perl....
And I *always* think Perl first :-)
To assign kudos, you need to explictly toggle them. Marking a post as "solved" [which is a very appropriate thing to do] is a *separate* action.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2011 12:31 PM - edited 08-24-2011 01:52 AM
08-23-2011 12:31 PM - edited 08-24-2011 01:52 AM
Re: Help with scripting issue ...
>I never think about using perl
You could also use sed to select the token between "rdisk/" and ")". Something like:
sed -e '/rdisk/ s:.*rdisk/\([^)]*\)):\1:' file
Actually some slight changes:
sed -n -e '/rdisk/ { s:.*rdisk/\([^)]*\)):\1:; p; }' file
- Tags:
- sed