Why does batch processing with unusal usage of command SET hang on running in console emulator Cmder? -
i have made small batch script generate md5 sum of file. works great when remove line @echo off
, hangs on execution in console emulator cmder version 1.1.4.1 when leave line.
@echo off if [%1]==[] goto usage /f "delims=" %%i in ('certutil -hashfile %1 md5 ^| find /v "certutil" ^| find /v "md5"') set output=%%i set /p =%output: =%<nul >%1.md5 goto :eof :usage @echo usage: %0 filename exit /b 1
if replace line set /p =%output: =%<nul >%1.md5
echo %output: =% >%1.md5
, batch file executed in cmder , not cmd.exe
of windows works, outputs additional newline don't want.
what going on?
edit: line doesn't hang on batch processing in cmder:
set /p ="hello" <nul
this line hangs on batch processing in cmder:
set /p ="hello" <nul >out
both lines work in batch file executed windows command processor in command prompt window.
Comments
Post a Comment