Benim komut dosyası: dizindeMantıksal VEYA benim kabuk komut
#!/bin/bash
for file in *.ats;
do
if [[ ("${file}" = THx) || ("${file}" = THy)]]
then cp $file /home/milenko/procmt
fi
done
Dosyalar istediğim ne
262_V01_C00_R000_TEx_BL_128H.ats
262_V01_C01_R000_TEy_BL_128H.ats
262_V01_C02_R000_THx_BL_128H.ats
262_V01_C03_R000_THy_BL_128H.ats
THX veya THY içeren dosyaları kopyalamak için, ama dosyalar kopyalanmaz. Neden?
for file in *.ats; do
if [[ $file == *TH[xy]* ]]; then
cp "$file" /home/milenko/procmt
fi
done
'cp * _TH [xy] _ *. Ats/home/milenk/procmt /'? Bir döngüye sahip olmanın hiçbir anlamı yok. –