My code is very simple.
variable=$( createTable $table_name ) or
returnedVariable=$( function $argument ) My code breaks on this line. I haven't been able to find anywhere on the internet how to both pass an argument and get a return value in Bash.
UPDATE: I get it now. I can't have multiple echo's in my function. Also echo should never be considered a return but a print statement or stdout which you can capture. Thank you for the feedback!
createTablelook like? Do you have a function namedfunction?functionis a reserved word in Bash.variable="$( createTable $table_name )"var=$(cmd)is the same asvar="$(cmd)", but$table_nameshould be quoted.