In bash scripting, functions can send output using echo and set an exit status using return. When you call a function, echo sends text to standard output, which you can capture using command substitution like output=$(myfunc). The return command sets a numeric exit status accessible via $?. Note that capturing output with $(myfunc) runs the function in a subshell, so the return status of the subshell is usually 0 if the command succeeds, not the function's return value. To get the function's return status, call it normally and check $?. Echo and return serve different purposes: echo for output, return for status. The function ends immediately after return. Understanding these helps you handle function outputs and statuses correctly in bash scripts.