You would have to populate the variable $target within your script like for example target=$1. Simply replacing it will not suffice and not work.
Lets see what we can find on documentation about this:
Positional parameters
Arguments passed to the script from the command line [1] : $0, $1, $2, $3 ...
$0 is the name of the script itself, $1 is the first argument, $2 the second, $3 the third, and so forth. [2] After $9, the arguments
must be enclosed in brackets, for example, ${10}, ${11}, ${12}.
The special variables $* and $@ denote all the positional parameters.
What you can do however is something similar to this to make it more readable inside the script:
#!/bin/sh
target=$1
But that would mean nesting variables/data which is by most people coding seen as a bad practice.