4 つのフォルダーに分割したい 32 個のファイル (同じパターンで名前が付けられています。唯一の違いは、以下に記載されている $sample 番号です) があります。次のスクリプトを使用してこのジョブを実行しようとしていますが、スクリプトが機能しません。誰か次のシェル スクリプトを手伝ってくれませんか? - ありがとう
#!/bin/bash
max=8 #8 files in each sub folder
numberFolder=4
sample=0
while ($numberFolder > 1) #skip the current folder, as 8 files will remain
do
for (i=1; i<9; i++)
do
$sample= $i * $numberFolder # this distinguish one sample file from another
echo "tophat_"$sample"_ACTTGA_L003_R1_001" //just an echo test, if works, will replace it with "cp".
done
$numberFolder--
end