- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Some script syntax
Operating System - HP-UX
1757454
Members
2703
Online
108862
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО11-17-2004 06:38 PM
тАО11-17-2004 06:38 PM
Some script syntax
Hi,
echo "Press [Y]/[y] to continue, [Enter] to quit \c"
read ans rest
if [ -z "$ans" ]
then
exit
fi
Above is part of the script.
1) what is \c for?
2) what is rest for?
3) what is -z for?
regards.
echo "Press [Y]/[y] to continue, [Enter] to quit \c"
read ans rest
if [ -z "$ans" ]
then
exit
fi
Above is part of the script.
1) what is \c for?
2) what is rest for?
3) what is -z for?
regards.
- Tags:
- echo
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2004 06:44 PM
тАО11-17-2004 06:44 PM
Re: Some script syntax
1) Supress return
(Will leave the cursoe after "quit")
2) "Garbage collector".
If user types other words after "y"
3) Test if zero = enter/return
Regards,
Trond
(Will leave the cursoe after "quit")
2) "Garbage collector".
If user types other words after "y"
3) Test if zero = enter/return
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2004 07:08 PM
тАО11-17-2004 07:08 PM
Re: Some script syntax
Hi,
1. if you specify \c then the ouput will be like:
Press [Y]/[y] to continue, [Enter] to quit
if \c is not specified then:
Press [Y]/[y] to continue, [Enter] to quit
3. -z is to see whether user simply pressed ENTER key that mean he entered nothing and the string length is zero so it's time quit.
Hope that helps.
Regards,
1. if you specify \c then the ouput will be like:
Press [Y]/[y] to continue, [Enter] to quit
if \c is not specified then:
Press [Y]/[y] to continue, [Enter] to quit
3. -z is to see whether user simply pressed ENTER key that mean he entered nothing and the string length is zero so it's time quit.
Hope that helps.
Regards,
You need to know a lot to actually know how little you know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2004 07:28 PM
тАО11-17-2004 07:28 PM
Re: Some script syntax
Hi
I am not going to repeat the explanations already given but if you need a good source for script info
http://www.shelldorado.com/
Steve Steel
I am not going to repeat the explanations already given but if you need a good source for script info
http://www.shelldorado.com/
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Tags:
- shelldorado
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP