bash yourscript.sh file1 file2 yourscript.sh inside script #!/bin/bash a=$1 # = to file1 b=$2 # = file2 echo $1 echo $2