In bash, how can I directly return the return value returned by calling a function (sry, I don't know how to express this better). Example:
foo() {
echo "$1"
return 1
}
bar() {
return foo 1
}
bar
If I do this, bash complains that a numeric parameter for the return statement is needed.
EDIT
I updated my example to better express the real problem. No only do I want to return the return code, I also want to pass a value to the function first... not sure if this is actually doable.