This repository was archived by the owner on Apr 26, 2024. It is now read-only.
  
  
  
  
  
Description
hi guys, would someone please explain the follow:
- in the terminal, the following code is NOT OK:
 
if  ;then echo yes;fi
-bash: syntax error near unexpected token `;'
 
- but if i run it in a shell file,  the code is OK, why?
 
cat tmp.sh
if  $1 ;then echo yes;fi
./tmp.sh
yes
 
I test these on bash version: 5.0.0(1)-release,  4.4.20(1)-release