I would like to know what this command does in a batch script:
subst Q: /D 1>nul 2>nul
That looks like a DOS command (not bash).
subst substitutes a folder for a drive letter or substitutes one drive letter for another
subst
The /D deletes (actually unmounts) a virtual (previously substituted) drive. So your command basically removes the virtual drive Q:
The 1>nul and 2>nul just get rid of the output (ie sends the standard output and standard error output to the nul device).
1>nul
2>nul
The subst command you are talking about is a DOS command, not bash.
What it does, is that it unmounts the virtual drive Q:, and the 1 > nul 2 > nul basically means that all output from the command is discarded.
That looks like a DOS command (not bash).
subst
substitutes a folder for a drive letter or substitutes one drive letter for anotherThe /D deletes (actually unmounts) a virtual (previously substituted) drive. So your command basically removes the virtual drive Q:
The
1>nul
and2>nul
just get rid of the output (ie sends the standard output and standard error output to the nul device).