diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-03-24 16:19:27 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2017-02-08 18:19:53 (EST) |
commit | f2a198a6c4436fd4d30366f7071886c54ffc2658 (patch) | |
tree | 502bc9f8736a90245c1416d394cda86db4eb7415 /research | |
parent | abf7a2bee69142d4fe5272e1569dea4f70455702 (diff) | |
download | eggshell-f2a198a6c4436fd4d30366f7071886c54ffc2658.zip eggshell-f2a198a6c4436fd4d30366f7071886c54ffc2658.tar.gz eggshell-f2a198a6c4436fd4d30366f7071886c54ffc2658.tar.bz2 |
research/return-string-without-subshell.sh: New file
Diffstat (limited to 'research')
-rw-r--r-- | research/return-string-without-subshell.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/research/return-string-without-subshell.sh b/research/return-string-without-subshell.sh new file mode 100644 index 0000000..a321e51 --- /dev/null +++ b/research/return-string-without-subshell.sh @@ -0,0 +1,39 @@ +greeting() +{ + return 'Hello' +} + +party() +{ + return 'World' +} + +main() +{ + echo $[greeting] $[party] + + return 0 +} + +### + +greeting() +{ + __retval0='Hello' + ! [ x'Hello' = x ] && ! [ x'Hello' = xfalse ] || [ x'Hello' = x0 ] +} + +party() +{ + __retval0='World' +} + +main() +{ + greeting + party + echo ${__retval0} ${__retval0} + + __retval0=0 + ! [ x0 = x ] && ! [ x0 = xfalse ] || [ x0 = x0 ] +} |