Create a file ending with the extension ".bat" This is needed on Windows systems. Unix systems don't require a specific file extension.
goto dossec \
echo Unix version
echo "Dos version"
The # is a comment in DOS, so it skips this line. DOS then executes the goto line and jumps to the :dossec line.
Unix errors on the goto line and falls through to the section immediately following the line. The error is hidden by the redirecting the output of the goto line to /dev/null and redirecting standard error to the same place.
The exit 0 ends the Unix section and is required to keep the Unix shell from trying to execute Dos commands and generating a lot of errors.