- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- regarding my previous question on shell programmin...
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
07-08-2003 02:00 AM
07-08-2003 02:00 AM
regarding my previous question on shell programming
regarding my last question on the skip sequence, I tried to use some of the solution mentioned. but it seems that they are not the right ones...
the user "hpux" gave a better explanation of my problem.. "I'm waiting for your full answer"
which is:
Before go to next step, system give a prompt "Do you want to continue? (Y/N)", this prompt will keep 10 seconds(for example) to wait a user to input 'Y' or 'N', if time exceed, system set the default input 'N' and go to next step.
I hope now you could help me better...
Regards,
Mohammed Z. Harbi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 02:56 AM
07-08-2003 02:56 AM
Re: regarding my previous question on shell programming
print "Do you want to continue? (Y/N)"
print "-> \c"
in=$(line -t 10)
case $in in
[Y|y]*) in="yes" ;;
esac
if [[ "$in" = "yes" ]] then;
#do this
fi
#next step
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 02:58 AM
07-08-2003 02:58 AM
Re: regarding my previous question on shell programming
echo "Do you want to continue"
answer=`line -t 30`
if [ "$answer" = "" ] || [ "$answer" = "n" ] || [ "$answer" = "no" ];
then exit
elif [ "$answer" = "y" ] || [ "$answer" = "yes" ] ;
then
#rest of script
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 03:32 AM
07-08-2003 03:32 AM
Re: regarding my previous question on shell programming
The magical command is "line".
Usage :
ANS=`line -t 5`
will allow 5 seconds for an answer and then carry on running the script.
Cheers,
Ollie.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 07:29 PM
07-08-2003 07:29 PM
Re: regarding my previous question on shell programming
Regards,
Mohammed Z. Harbi