Answers for "bash pass all arguments"

6

pass parameters to bash script

# Run the script with the arguments as you would for
# every other command.
# Example: ./script.sh arg1 arg2 

#!/bin/sh
echo "argument1: $1"
echo "argument2: $2"

# Output: 
# argument1: arg1
# argument2: arg2
Posted by: Guest on March-25-2021
1

bash pass all arguments

source script.sh "$@"
Posted by: Guest on June-07-2020

Code answers related to "bash pass all arguments"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language