Skip to content

Instantly share code, notes, and snippets.

@handakumbura
Last active April 26, 2017 04:57
Show Gist options
  • Save handakumbura/ef9903b1a71bbd5bdb0c1ad39ac56860 to your computer and use it in GitHub Desktop.
Save handakumbura/ef9903b1a71bbd5bdb0c1ad39ac56860 to your computer and use it in GitHub Desktop.
findproductnames()
{
DELIMITER="*"
PROD_ONE="Apache JMeter"
PROD_TWO="Apache Tomcat"
echo $PROD_ONE$DELIMITER$PROD_TWO
return
}
FUNCTION_CALL_RETURN_VALUES="$(findproductnames)"
echo $FUNCTION_CALL_RETURN_VALUES
VALUE_ONE="$(echo $FUNCTION_CALL_RETURN_VALUES | awk -F '*' '{print $1}')"
VALUE_TWO="$(echo $FUNCTION_CALL_RETURN_VALUES | awk -F '*' '{print $2}')"
echo $VALUE_ONE$VALUE_TWO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment