-
-
Save Ravlissimo/4c2bce8b660e489491e6d69ba8f1e4f7 to your computer and use it in GitHub Desktop.
[Batch] Alternate Method of echoing output onto the same line. No CR+LF !
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
call :createSub | |
call :echoWithoutLinefeed "=hello" | |
call :echoWithoutLinefeed " world" | |
exit /b | |
:echoWithoutLinefeed | |
> txt.tmp (echo(%~1!sub!) | |
copy txt.tmp /a txt2.tmp /b > nul | |
type txt2.tmp | |
del txt.tmp txt2.tmp | |
exit /b | |
:createSub | |
copy nul sub.tmp /a > nul | |
for /F %%a in (sub.tmp) DO ( | |
set "sub=%%a" | |
) | |
del sub.tmp | |
exit /b | |
:: jeb | |
:: http://www.dostips.com/forum/viewtopic.php?f=3&t=4213&p=23568#p23568 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment