i want to redirect echo output to a file but without the eol char.
for example
echo salalalala > something.text
something.text contains
1 salalalala[CRLF]
2 [newline]
Is there any quick way to disable eol?
strip eol character of echo command
Moderator: DosItHelp
strip eol character of echo command
Last edited by miltos on 29 Aug 2012 06:47, edited 1 time in total.
Re: disable eol character of echo command
never mind; I found something that works for me
@echo off
echo | set /p =salala > something.text
@echo off
echo | set /p =salala > something.text
Re: disable eol character of echo command
'
Here is another way of achieving what you want, it works because the input stream is closed by the redirecting to con.
The reason you have to pipe CRLF to set is cause 'set /p' is meant to read input from device.
It expect termination of the input.
Here is another way of achieving what you want, it works because the input stream is closed by the redirecting to con.
Code: Select all
<nul set /p "=salala" > something.text
Code: Select all
>set /?
...
SET /P variabele=[promptString]