Use the macro variables to generate the command you pass to the shell the same way you would use the macro variables to generate any other SAS command you want to run.
So if you want run the unix command
test.sh x y
And you have two macro variables named, for example, arg1 and arg2, like so:
%let arg1=x;
%let arg2=y;
Then you can generate that command like so:
test.sh &arg1. &arg2.
Personally I prefer to use a pipe to run the operating system commands, since then the program and read back any messages the command might reply with.
data _null_;
infile "test.sh &arg1. &arg2." pipe;
input;
put _infile_;
run;