Execute the first specified commands if the condition is true otherwise execute the second specified commands

if

  • Performs conditional processing in batch scripts.
    More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/if>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

if {{condition}} ({{echo Condition is true}}) else ({{echo Condition is false}})

click the source code to copy install if on any operating system with command-not-found.com