Skip to content

Function output cannot be redirected #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
subnut opened this issue Feb 6, 2022 · 1 comment
Open

Function output cannot be redirected #196

subnut opened this issue Feb 6, 2022 · 1 comment

Comments

@subnut
Copy link

subnut commented Feb 6, 2022

$ hello() { HI=0xDEADBEEF; echo $HI; }
$ hello > /dev/null
0xDEADBEEF
$ exit

Expected output -

$ hello() { HI=0xDEADBEEF; echo $HI; }
$ hello > /dev/null
$ exit
@9ao9ai9ar
Copy link

This is really bad. I have a script running something like this:

while read -r word; do
    : work
done <<EOF
$(call_function)
EOF

and it just gets stuck at this part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants