- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Help need on perl scripting
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
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
07-25-2005 02:48 AM
07-25-2005 02:48 AM
Can any tell me how to execute two unix commands by using perl "exec()" function.
I want to execute below two commands in one shot.
1st Command is
DISPLAY=`/usr/bin/hostname`:10.0; export DISPLAY
2nd command is
/usr/bin/X11/mwm -display :10.0
Thanks & Regards
Manoj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 02:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 02:58 AM
07-25-2005 02:58 AM
Re: Help need on perl scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 03:01 AM
07-25-2005 03:01 AM
Re: Help need on perl scripting
exec 'DISPLAY=`/usr/bin/hostname`:10.0; export DISPLAY ; /usr/bin/X11/mwm -display :10.0'
If you want to run them independantly in parallel, then there's no point. All your 1st command does is export a variable. Why do this if you're not going to use it, it'll disappear when you exit the exec anyhow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 03:05 AM
07-25-2005 03:05 AM
Re: Help need on perl scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 03:46 AM
07-25-2005 03:46 AM
Re: Help need on perl scripting
Warm regards,
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 04:09 AM
07-25-2005 04:09 AM
Re: Help need on perl scripting
use Sys::Hostname;
$ENV{DISPLAY}=hostname.":10.0";
system("/usr/bin/X11/mwm");
Enjoy, Have FUN! H.Merijn