Exit return codes

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
ylafont
Posts: 5
Joined: Sun Jul 30, 2017 11:49 am

Exit return codes

Post by ylafont »

Description of problem or question:

Cannot seem to find proper use of how to read the exit code when processing a file in Ubuntu 16.04 LTS (CLI). Has this been document somewhere?

Thank you.
ylafont
Posts: 5
Joined: Sun Jul 30, 2017 11:49 am

Re: Exit return codes

Post by ylafont »

Think found the answer somewhere.. please alert if incorrect.

if [ $? -eq 0 ]; then #move files if conversion was a success
cp "/tmp/$fileName" "$folder/"
rm "/tmp/$fileName"
fi
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Exit return codes

Post by BradleyS »

Anything other than 0 is a failure.
Post Reply