Timeline for Bash - Return value from subscript to parent script
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 25, 2015 at 17:14 | review | Low quality answers | |||
Feb 25, 2015 at 22:01 | |||||
Feb 25, 2015 at 17:13 | history | edited | FrustratedWithFormsDesigner | CC BY-SA 3.0 |
spelling error
|
May 2, 2013 at 14:11 | comment | added | chepner |
Ah, tricky. I guess the right answer then is "use return or exit as appropriate".
|
|
May 2, 2013 at 13:52 | comment | added | cdarke |
@chepner: actually return can also be used from a "sourced" file ( . or source command), but is that then a script?
|
|
May 2, 2013 at 13:25 | comment | added | chepner |
"Return" is ambiguous here, as the return statement can only be used to return from a function, not a script. To be precise, you need to use the exit statement to return from the script.
|
|
May 2, 2013 at 12:47 | review | Low quality answers | |||
May 2, 2013 at 12:53 | |||||
May 2, 2013 at 12:31 | history | answered | Nagasaki | CC BY-SA 3.0 |