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
2
  • Possible duplicate of if, elif, else statement issues in Bash Commented Oct 12, 2019 at 14:54
  • 1
    Your description and the script doesn't match Commented Oct 12, 2019 at 14:57

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.