Liliyaw commented on PR #11406:
URL: https://github.com/apache/tvm/pull/11406#issuecomment-1134806701

   > While the new syntax looks better, tbh, I don't fully understand the 
difference between the two. Cursory googling shows that -o / -a are going to be 
obsolete in standard, but couldn't find authentic source for it. Maybe 
@leandron @Mousius know more about it.
   
   Hi IMO, the difference between -o and || is that, command1 -o command2, the 
two commands will operate at the same time to judge the result. But for 
command1 || command 2, command 2 only operate when command 1 is not right. So 
in this use case, I guess previous you hope when CLI parameter <1( means you 
will not input any parameter), you will see the show_usage() information too 
right? But in the code above, if a user don't input any parameter, it will 
means $1 will not exists and then it will report an unbound variable error. 
   
   here, in this script, it's used for docker file and you can find in that 
file, it specify a parameter, which means $1 will never appear not existing 
status. The grammar doesn't report have issue but if you only use the script 
itself, you can find that if you don't specify any CLI para, it will not print 
show_usage() information. Instead with an error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to