I have this code but I don't understand it very well.
Can you explain to me how the finish variable gets the value.
what does this assignment "finish=$?" mean?
or if they have any documentation to help me understand.
Thanks in advance.
#!/usr/bin/bash
/usr/bin/java -jar Report.jar $user $pass $base $dateini $datefin $iphost >> file.log 2>&1
finish=$?
if [ $finish -eq 0 ]; then
echo "Report executed successfully" >> file.log
exit 0
else
echo "There was an error in the report" >> file.log
exit 1
fi