Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
 
PREVIOUS NEXT
Tagged: #pass #parameters #bash #script
ADD COMMENT
Topic
Name
8+3 =