1. check if $1 ( first argument) is available, if yes assign its value to C_id, if not, assign -1 to C_id.
2. if case one executed successfully. check if $2 ( second argument) is available, if yes assign its value to f_id, if not, assign -1 to f_id.
3. if case 2 executed successfully, compare value if C_id with -1, if its equal to -1, execute the Sintaxis function.
---------- Post updated at 04:02 PM ---------- Previous update was at 03:37 PM ----------
And regarding "&&",
&& and || are the shell construct. which applies the action based on the success or failure of the previous commands.
Code:
cd abc && echo "change dir successfully" || echo "failed to change dir"
In the above code,
if "cd" si successful to change i.e exit code is zero. this will execute the command after "&&". if it failed to change dir, the commands after "||" will be executed.