- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to display a message for a few seconds only ?
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
08-17-2004 01:29 AM
08-17-2004 01:29 AM
Can't execvp cat message ; sleep 30
$ /bin/sh -c xterm -e "cat message ; sleep 30"
Doesn't work
In the latter, I don't know how to nest quotes and group commands / arguments properly.
I don't know how to display an announcement message for a limited amount of time and then continue the main script.
Grrr...this simple and straightforward request has taken me already about 4 hours of frustration. I love VB, I like Tcl, but I have a love/hate relationship with...
Nobody seems to be able to tell me what "execvp" means and why it does what it does(n't do)...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 01:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 01:47 AM
08-17-2004 01:47 AM
Re: How to display a message for a few seconds only ?
xterm -e "cat message ; sleep 30"
xterm will try to run as,
execution of cat message ; sleep 30 can not be done.
Try as like as,
# cat > /tmp/test.ksh
cat message
sleep 30
# chmod +x /tmp/test.ksh
# export DISPLAY=ip:0
# xterm -e /tmp/test.ksh
It will do now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 01:48 AM
08-17-2004 01:48 AM
Re: How to display a message for a few seconds only ?
man execvp
will answer.
As to your problem, try with some parenthesis:
xterm -e /usr/local/myscript.sh
where myscript.sh is
#!/sbin/sh
/usr/bin/cat message
/usr/bin/sleep 30
exit 0
I tested it on my system and it works.
Regards,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 01:49 AM
08-17-2004 01:49 AM
Re: How to display a message for a few seconds only ?
just forgetting one thing: check that the DISPLAY variable is properly set :)
Regards,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 02:18 AM
08-17-2004 02:18 AM
Re: How to display a message for a few seconds only ?
you can do the following :
create a script (executable file) with the following content
echo hello
sleep 5
then set the DISPLAY Variable and run the script
xterm -e /tmp/<script_name>
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 02:29 AM
08-17-2004 02:29 AM
Re: How to display a message for a few seconds only ?
did you try my solution ? It works ...
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 02:54 AM
08-17-2004 02:54 AM
Re: How to display a message for a few seconds only ?
Thanks guys for pointing out that ";" and "xterm -e" are not friends.
"The solution to a problem changes the problem"
- What if I want my message to appear in "pager" and users don't have to wait for the 'sleep' period to complete...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 03:59 AM
08-17-2004 03:59 AM
Re: How to display a message for a few seconds only ?
/bin/sh -c 'xterm -e "echo message;sleep 15"' &
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 04:06 AM
08-17-2004 04:06 AM
Re: How to display a message for a few seconds only ?
/bin/sh -c 'xterm -e "echo message;sleep 15;exit"' &
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2004 05:41 PM
08-17-2004 05:41 PM
Re: How to display a message for a few seconds only ?
Example :
Xdialog --title "Message" --infoxbox "Write your message here" 0 0 30000&
Gerard