Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to continue looping on failure?

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

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

-p-
Do not query password

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading