How could I make a script that functioned like this:

when you run the script like this

script.sh "filename"

the script would run

tar xvfj "filename"