arnpry
arnpry

Reputation: 1141

Pass Range of Numbers Argument to Bash Script

I'm trying to pass a range of numbers (YYYYMMDD date) as an argument to a Bash script via the terminal:

time ./somescript.sh 201808{01..28}

This method is not working though and only passes "20180801" before quitting

Upvotes: 0

Views: 422

Answers (1)

You need to use

"$@"

in your script ./somescript.sh, and not

"$1"

Upvotes: 2

Related Questions