Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Support of GOTO and Labels

Status
Not open for further replies.

hiunix

Programmer
Mar 31, 2005
3
0
0
US
Hi Guys,
I just wanted to know if there is a support for GOTO and LABELS in UNIX or they need to be implemented by IF THEN ELSE Blocks.

Regards
 
Hey ,

We have to migrate a lot of code written in VAX Com Scripts and implement them in Unix Shell Scripts.
In the Com scripts there are a lot of GOTO and LABELS Being used , so wanted to know if in Shell Scripting we can use something similar.

Regards,
HiUnix
 
If you use the C-shell the goto is available.

#!/usr/bin/csh
goto aaabbb
echo "NO"
aaabbb:
echo "YES"
 
Do yourself a favor:
since you are going to have to do fairly extensive modifications to get these scripts to work, rewrite them in as a shell script with PROPER structure. This will save you time in the long run and allow for easier maintenance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top