- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: goto command in shell
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
05-22-2002 06:34 AM
05-22-2002 06:34 AM
Is there a goto command in shell? And if there is one, does anyone know how to use it?
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 06:49 AM
05-22-2002 06:49 AM
Re: goto command in shell
As I know there is not a goto command in shell, but if you think there is not necessary to do the things that you want to do.
If you want I can help you with your script.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 06:59 AM
05-22-2002 06:59 AM
SolutionSorry, no. However, in Posix shell (or 'ksh') you have 'break' to exit from a 'for' 'select', 'until', or 'while' loop, and 'continue' to resume the next iteration of the same (for, select, until, while); and 'return' to immediately exit a function.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 07:03 AM
05-22-2002 07:03 AM
Re: goto command in shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 07:15 AM
05-22-2002 07:15 AM
Re: goto command in shell
Nothing messes up easily understood code better than a goto.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 07:21 AM
05-22-2002 07:21 AM
Re: goto command in shell
As all have said no goto but calling a script from a script can be made to behave like a goto.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 07:39 AM
05-22-2002 07:39 AM
Re: goto command in shell
Bill made me chuckle, having been around awhile... Be glad for 'break' and 'continue' at least. I once developed some communication "algorithms" in a network language (NDLII on Burroughs (Unisys)) that not only lacked "goto" but also *any* way to break out of a loop short of setting a boolean variable, testing it and conditionally executing or not the next block of code.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 07:59 AM
05-22-2002 07:59 AM
Re: goto command in shell
As Paula stated you can call another script from w/in a script - but keep in mind you cannot go back. And don't try to call back to the org script or you'll be in loop hell as it would go back to the start of the org script & hit the call, which hits the call in 2nd script, etc.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 11:20 AM
05-22-2002 11:20 AM
Re: goto command in shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 11:23 AM
05-22-2002 11:23 AM
Re: goto command in shell
...and the 'csh' is a poor practice shell... :-))
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2002 06:20 AM
05-23-2002 06:20 AM
Re: goto command in shell
It uses the case statement to restart accounting is if fails partway through the processing.