Skip to content

Instantly share code, notes, and snippets.

@denisidoro
Created September 23, 2019 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denisidoro/5d98ee3cdf10c08c400a399798d4e63c to your computer and use it in GitHub Desktop.
Save denisidoro/5d98ee3cdf10c08c400a399798d4e63c to your computer and use it in GitHub Desktop.
my_fn()
local -r foo="$(complex_calc1)"
local -r bar="$(complex_calc2)"
echo "${foo};${bar}"
}
foo_plus_bar="$(my_fn)"
foo="$(echo "$foo_plus_bar" | cut -d';' -f1)"
bar="$(echo "$foo_plus_bar" | cut -d';' -f2)"
other_fn "$foo" "$bar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment