mrsh
mrsh copied to clipboard
Function output cannot be redirected
$ hello() { HI=0xDEADBEEF; echo $HI; }
$ hello > /dev/null
0xDEADBEEF
$ exit
Expected output -
$ hello() { HI=0xDEADBEEF; echo $HI; }
$ hello > /dev/null
$ exit
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.