Is it possible execute chmod and ignore error from commandExample ( remark file.txt not exsist to show the example )When I typechmod 777 file.txtI get error on the output  chmod: cannot access file.txt : no such file or directorySo I add the-f flag to the command as the following: ( file.txt not exist in order to show the case )  chmod -f 777 file.txt  echo $?  1But from the example chmod return 1Please advice how to force the chmod command to give exit code 0 in spite of error 
chmod + silent mode + how force exit code 0 in spite of error
shell;shell script;chmod;error handling
Please advice how to force the chmod command to give exit code 0 in  spite of errorchmod -f 777 file.txt || :This would execute :, i.e. the null command, if chmod fails.  Since the null command does nothing but always succeeds, you would see an exit code of 0.