1

I have following code, which would unrar all the rar file, but it failed on the first rar which require password, and then exit. I tried add "|| true", but no luck

find ./downloaded/ -type f -iname \*.rar | while read ss
do
    ss="$(realpath "$ss")"
    cd "$(dirname "$ss")"
    unrar x -r -o+ "$ss" || true
done
huangyingw
  • 89
  • 6
  • This sounds a lot like the problems you get using `ssh` `ffmpeg`, or `HandBrakeCLI` in a `while read` loop. See [BashFAQ #89](http://mywiki.wooledge.org/BashFAQ/089) and [this question](https://stackoverflow.com/questions/62585875/bash-script-do-loop-exiting-early). – Gordon Davisson Sep 23 '22 at 05:35

1 Answers1

1
unrar x -r -p- -o+ "$ss" || true

-p- Do not query password

gapsf
  • 634
  • 4
  • 8