0

I want to run command cp to all files with existing pattern somename.en.srt id /path/movies/movie name/ only if file exist and quit if not my command is like below, how to add if, then, else here for all somename.en.srt files?

for file in /share/CACHEDEV1_DATA/Download/Movies/*/*.en.srt
do
    /share/CACHEDEV1_DATA/.qpkg/Entware/bin/addbom "$file" "${file%.pl.srt}.1.srt"
done
theduck
  • 2,589
  • 13
  • 17
  • 23
lukjod
  • 9
  • 1
  • Possible duplicate of [if, elif, else statement issues in Bash](https://stackoverflow.com/questions/16034749/if-elif-else-statement-issues-in-bash) – nbk Oct 12 '19 at 14:54
  • 1
    Your description and the script doesn't match – oguz ismail Oct 12 '19 at 14:57

0 Answers0