[Info-vax] /END=label
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Mon Aug 27 15:55:20 EDT 2018
On 2018-08-27 19:13:50 +0000, John Reagan said:
> On Monday, August 27, 2018 at 1:49:13 PM UTC-4, Stephen Hoffman wrote:
>> On 2018-08-27 17:26:18 +0000, John Reagan said:
>>
>>> bash doesn't even have a 'goto' and people have to resort to using case
>>> statements to case on the result (no different than looking at $STATUS
>>> and IF/THEN/ELSE'ing on the result)
>>
>> "Prepare to cringe": https://bobcopeland.com/blog/2012/10/goto-in-bash/
>
> I saw that one and promptly gouged out my eyes. However, that isn't
> what what the OP wanted. That just does "goto" by cloning the script,
> editing it on the fly, and invoking the cloned script. None of that
> was done under program control.
Yeah; I know. It was in response to your reference to a lack of goto
in bash, and not to the OP's request for DCL.
csh is one of the few shells I've used that does have goto. There are
probably others with goto. Use of case and traps are common in bash.
There's also no direct analog for an EXIT and DEBUG traps in DCL.
I haven't encountered a shell script that does what Bill indicates was
possible on Unix and that did provide an analog to what the OP wanted
and DCL and that whether csh or otherwise.
What Bill was referencing wasn't clear, and could well have been a
mis-reading of the original question around error handling. Like you,
I'm not aware of a way to do what the OP was requesting within bash or
a couple of other shells. Hence that portion of your reply was
expunged from my reply.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list