can you use goto in bash script
I am using Red Hat linux.
Can you use 'goto' in a bash script to jump to a label based on an if condition. Thanks, sabliny |
Noop, use if command.
if [ condition ]; then ... else ... fi |
goto's are a hideously awful way to program, you should use a function or a similar construct instead: http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-8.html
|
It is practically impossible to teach good programming style to
students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. -- Dijkstra Cheers, Tink |
All times are GMT -5. The time now is 03:25 AM. |