Dennis
This is answered in "Batch file information and FAQs" which was posted by
Prof. Timo Salmi just 4 days ago.
--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)
Covered in the FAQ: "Is it possible to echo without linefeed like the Unix
echo -n?"
http://www.netikka.net/tsneti/info/tscmd015.htm
If you don't want to use any of the several solutions listed there, you can
use this, either by compiling it or using an interpreter (although I'd skip
QBASIC for this):
-----begin echonocr.bas-----
PRINT COMMAND$;
-----end echonocr.bas-----
Alternately alternately, you can use this:
-----begin echonocr.c-----
#include <stdio.h>
int main (int argc, char *argv[]) {
if (argc > 1) {
printf ("%s", argv[1]);
if (argc > 2) {
for (int i=2; i<argc; i++) {
printf (" %s", argv[i]);
}
}
}
}
-----end echonocr.c-----
Compile that with your C compiler of choice. It should work pretty much
anywhere. (It's good in DOS, Windows, and Linux, along with several other
OS's you've probably never heard of.)
--
Words remain my only escape.
> Dennis Halver wrote:
>> Normally when I execute an "echo" command then automatically an
> CR/newline/linefeed
>> is appended. Is there a way to omit/avoid this CR/linefeed?
>
> This is answered in "Batch file information and FAQs" which was posted by
> Prof. Timo Salmi just 4 days ago.
Ah, I love the Cox servers. Your response appeared *immediately* after I
posted mine.
--
Lost within my plans for life, it all seems so unreal.
Then the command :
xecho #P
Will Not include the CR+LF linefeed 'characters'
Available at :
==
Cheers, Tim Meddick, Peckham, London. :-)
"Dennis Halver" <ha...@persrec.com> wrote in message
news:4a4bb6db$0$32663$9b4e...@newsspool2.arcor-online.net...
0>nul set /p="String without \n"
I don't think so.
-----------------
Joseph Rose, a.k.a. Harry Potter
Working magic in the computer community...or at least striving to! :(
Try this
<nul Set/p=Hi Dennis
\Rems
In the more recent WinNT derived OSs, this is often done using a
characteristic of the SET statement with its /P switch. as in ...
set /p dummy="This is text to be echoed without a newline. " < nul
echo For example.
It can also be done by 'escaping' the end-of-line with the standard
escape character, the carat (^), as in ...
echo Beginning of line ^
echo end of line
In older OSs, like DOS and Win9x/Me, it is not particularly easy and
is messy. There are even little utilities around to provide this
capability. I suspect you want one of the solutions above, so I'll
leave it at that.
Tom Lavedas
***********
Yeah I wish I knew. In unix under bash echo -n does the job
Yeah I wish I knew. The bash shell (unix) has echo -n for that.
> Yeah I wish I knew. In unix under bash echo -n does the job
FAQ
All the best, Timo
--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/
Hpage: http://www.uwasa.fi/laskentatoimi/english/personnel/salmitimo/
Department of Accounting and Finance, University of Vaasa, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm
> Um could you give me a link to the FAQ.
As per the above
"Useful CMD script trickshttp://www.netikka.net/tsneti/info/tscmd.htm"
(Please kindly solely use newsgroups, not email, for programming and
similar questions you may have to me.)
All the best, Timo
--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/
Home page: http://www.uwasa.fi/laskentatoimi/henkilokunta/salmitimo/
Department of Accounting and Finance, University of Vaasa, Finland
Timo's FAQ materials at http://lipas.uwasa.fi/~ts/http/tsfaq.html
> Normally when I execute an "echo" command then automatically an CR/newline/linefeed
> is appended. Is there a way to omit/avoid this CR/linefeed?
http://groups.google.de/group/comp.os.msdos.programmer/msg/ea17aa0abbee737e
ftp://garbo.uwasa.fi/pc/batchutil/echon.zip
http://www-user.tu-chemnitz.de/~heha/viewzip.cgi/hs_freeware/dosmisc.zip/ECHON.EXE
--
Robert Riebisch
Bitte NUR in der Newsgroup antworten!
Please reply to the Newsgroup ONLY!