- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: add checking
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
09-16-2013 03:19 AM - edited 09-24-2013 11:02 PM
09-16-2013 03:19 AM - edited 09-24-2013 11:02 PM
add checking
deleted
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2013 09:33 AM
09-16-2013 09:33 AM
Re: add checking
One way to check the output of a system command is to run it in a Perl 'open' operation and filter on the output. For example:
my $fh;
my $cmd = "ls -1 /tmp";
if ( open( $fh, "$cmd |" ) ) {
while( $fh ) {
my $line = $_;
# Process the $line content here...
}
close( $fh);
}
There's plenty of examples of this sort of operation on the web. But I'd suggest learning a little more about perl before you proceed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2013 08:16 AM - edited 09-19-2013 08:17 AM
09-19-2013 08:16 AM - edited 09-19-2013 08:17 AM
Re: add checking
I'm having some difficulty understanding you. What do you mean by "the UNIX command"? Do you want to pass an arbitrary command to the subroutine and have it executed?