how to assign script argument to a variable

I have a script file. test.sh
I am running it by command
sh test.sh 10102004

where 10102004 is the script argument.
I wan to assign this 10102004 to a variable.
How can i do this?

I tried &1 and awks ARGV[1] its not working :frowning:

me@hostname:~/tmp> ./tmp2.sh test1 test2
./tmp2.sh
test1
test2
me@hostname:~/tmp> cat tmp2.sh
#!/bin/sh
echo $0
echo $1
echo $2

me@hostname:~/tmp>

The script name will be $0, and each argument after that is incremented by 1.

Inside your script:

var=$1

which means, var=10102004
(first argument of your script)