シェルスクリプトを呼び出すときにパラメータを渡すにはどうすればよいですか?

シェルスクリプトを呼び出すときにパラメータを渡すにはどうすればよいですか?
#!/bin/bash

./bbmap.sh ref=ref.fa # creating index file from the input  

for $i in {ls*.fastq} # trying to run batch processing 
do
    ./bbmap.sh in=$i out={.}
done

それは言う:

BBMap version 35.74
Retaining first best site only for ambiguous mappings.
No output file.
NOTE:   Ignoring reference file because it already appears to have been processed.
NOTE:   If you wish to regenerate the index, please manually delete ref/genome/1/summary.txt
Set genome to 1

Loaded Reference:   3.390 seconds.
Loading index for chunk 1-2, build 1
Generated Index:    1.011 seconds.
No reads to process; quitting.

Total time:         4.443 seconds.
TestScript.sh: line 6: `$i': not a valid identifier

ベストアンサー1

コマンドラインに渡し、などを使用してスクリプトから$1参照します。$2

おすすめ記事