Last active
August 11, 2023 08:55
-
-
Save harishkannarao/50c4c32aca762cdc675acfdb095eb05d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make the script to abort if any command fails. Use set +e to change the behaviour and ignore failed command. | |
set -e | |
# Uncomment below line to print the commands as it is executed. Useful for debugging. Use set +x to disable debugging. | |
# set -x | |
# Source the functions from an url | |
source <(curl -s "https://gist.githubusercontent.com/harishkannarao/58d317f2743c842b5323165a492db81c/raw/75ee691d4d4568c59443a070c6e5d192d717b6bc/reusable_functions.sh") | |
# Source it from local script | |
# source reusable_functions.sh | |
ADD_RESULT=$(add 2 3) | |
echo "Addition result: $ADD_RESULT" | |
SUBTRACT_RESULT=$(subtract 4 3) | |
echo "Subtraction result: $SUBTRACT_RESULT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment