How to "Echo >>>><<<<" ???

How to "Echo >>>><<<<" ???

Post by Thomas Heinri » Sat, 02 Mar 2002 00:55:49



When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the "<" and ">" as part of the echo command.

How do I display these chars ?

Thank you
Thomas

 
 
 

How to "Echo >>>><<<<" ???

Post by Outside » Sat, 02 Mar 2002 01:06:37



> When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the "<" and ">" as part of the echo command.

> How do I display these chars ?

> Thank you
> Thomas


CLS
ECHO.
ECHO.
ECHO          Welcome to the mini special character demo :-)
ECHO.
PAUSE
CLS
ECHO.
ECHO.

%COMSPEC%/CFOR %%n in (1 2) do PROMPT Here comes a pipe $b $_|FIND/v/i "PROMPT">%temp%.\temp.txt

DEL %temp%.\temp.txt
ECHO.
PAUSE
CLS
ECHO.
ECHO.



ECHO.
PAUSE
CLS
ECHO.
ECHO.



ECHO.
PAUSE
CLS
ECHO.
ECHO.

ECHO  Now let's place a ">" character into a file.

COMMAND/E:2048/C %temp%.\spchar1.bat |FIND "+" >%temp%.\results.txt

DEL %temp%.\spchar1.bat
DEL %temp%.\results.txt
ECHO.
PAUSE
CLS
ECHO.
ECHO.

ECHO %%"%% ECHO Y | DEL temp.tmp %%"%% >%temp%.\temp.bat

ECHO.
PAUSE
CLS
ECHO.
ECHO.

ECHO dir/ad/w%% "%%|%% "%% more > %temp%.\temp.bat

DEL %temp%.\temp.bat
ECHO.
PAUSE
CLS
ECHO.
ECHO.
ECHO                             I hope you enjoyed it!

--
Outsider

 
 
 

How to "Echo >>>><<<<" ???

Post by Dean Wells [MVP » Sat, 02 Mar 2002 01:22:11


Like this -

echo ^>^>^>^>^>^<^<^<^<^<

HTH

Dean

--
Dean Wells
MSEtechnology

[[ Please respond to the Newsgroup only ]]


: When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the
"<" and ">" as part of the echo command.
:
: How do I display these chars ?
:
: Thank you
: Thomas
:

 
 
 

How to "Echo >>>><<<<" ???

Post by Outside » Sat, 02 Mar 2002 02:23:06



> Like this -

> echo ^>^>^>^>^>^<^<^<^<^<

> HTH

Not much help since it can't work.

MVP=MaybeVeryPhony
<G>

--
Outsider

 
 
 

How to "Echo >>>><<<<" ???

Post by Timo Sal » Sat, 02 Mar 2002 02:55:05



> When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the "<" and ">" as part of the echo command.

http://www.uwasa.fi/~ts/http/margin.html

Quote:> How do I display these chars ?

 38) Is it possible to echo the redirection symbol in a batch?

 213335 Feb 6 2002 ftp://garbo.uwasa.fi/pc/link/tsbat.zip
 tsbat.zip A collection of useful batch files and tricks, T.Salmi

   All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa

Timo's  FAQ  materials  at   http://www.uwasa.fi/~ts/http/tsfaq.html

 
 
 

How to "Echo >>>><<<<" ???

Post by Dean Wells [MVP » Sat, 02 Mar 2002 03:09:53


I assume you're using true blue MS-DOS then ... if so, unlucky and
you're right. I know of no way of making that work.

PS - Thanks for the MVP redefinition ... I prefer "makes vendettas
personal" 'cause it fits. :)
PPS - Hope the humor comes across in a post, honest - I'm not a stalker
... well, no more than anyone else :)

Hope you find a solution.

Dean

--
Dean Wells
MSEtechnology

[[ Please respond to the Newsgroup only ]]



: >
: > Like this -
: >
: > echo ^>^>^>^>^>^<^<^<^<^<
: >
: > HTH
:
: Not much help since it can't work.
:
: MVP=MaybeVeryPhony
: <G>
:
: --
: Outsider

 
 
 

How to "Echo >>>><<<<" ???

Post by William Alle » Sat, 02 Mar 2002 03:31:01



> When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the "<" and ">" as
> part of the echo command.

> How do I display these chars ?

You can ECHO a custom prompt message. Type the command
prompt /?
for help with the PROMPT command.

For example, this demo ECHOes the string you want:

====Begin cut-and-paste (omit this line)


  %COMSPEC% /e:4096 /c %TEMP%.\_P.BAT|find ">"
  DEL %TEMP%.\_P.BAT

====End cut-and-paste (omit this line)
Cut-and-paste text between the ==== lines into file with extension .BAT
(and suitable base name). Lines that don't begin with two spaces have
wrapped accidentally. The code sample is purely for demonstration and
study purposes. It was written/tested in the Win9x GUI.

--
(pp) William Allen

 
 
 

How to "Echo >>>><<<<" ???

Post by Charles D » Sat, 02 Mar 2002 04:26:46



Quote:>Like this -

>echo ^>^>^>^>^>^<^<^<^<^<

Great for CMD.EXE, not so hot in COMMAND.COM which has
no character escape.

In 4DOS the same basic principle applies.  Escape the redirection
token using whatever the current literal-character escape is:
Control-X by default, changeable to caret or whatever by SETDOS /E.
Or else use %=>  -- the %= expands to the character escape, whatever
it may be set to.

--

 
 
 

How to "Echo >>>><<<<" ???

Post by Dean Wells [MVP » Sat, 02 Mar 2002 04:41:27


Yeah, I eventually realized that. Sadly, I got the question from a group
more commonly relating to Windows 2000 and assumed a misuse of
terminology ... my mistake :(

--
Dean Wells
MSEtechnology

[[ Please respond to the Newsgroup only ]]



:
: >Like this -
: >
: >echo ^>^>^>^>^>^<^<^<^<^<
:
: Great for CMD.EXE, not so hot in COMMAND.COM which has
: no character escape.
:
: In 4DOS the same basic principle applies.  Escape the redirection
: token using whatever the current literal-character escape is:
: Control-X by default, changeable to caret or whatever by SETDOS /E.
: Or else use %=>  -- the %= expands to the character escape, whatever
: it may be set to.
:
: --

:

 
 
 

How to "Echo >>>><<<<" ???

Post by Dr John Stockto » Sat, 02 Mar 2002 04:36:40




Thu, 28 Feb 2002 16:55:49 :-

Quote:>When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the "<" and
>">" as part of the echo command.

Far too many newsgroups.  Crossposting between a.m.b & a.m.b.nt is
generally unwise.

        EKKO 62 62 62 62 'AAAA 60 60 60 60

or      EKKO 62 62 62 62 'AAAA 60 60 60 60 13 10

if you want a CRLF at the end.

EKKO via sig line 3.  Also accepts Hex.  Generates all characters
$00..$FF.

--

 Web  <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
 PAS EXE TXT ZIP via  <URL:http://www.merlyn.demon.co.uk/programs/00index.htm>
 My DOS  <URL:http://www.merlyn.demon.co.uk/batfiles.htm> - also batprogs.htm.

 
 
 

How to "Echo >>>><<<<" ???

Post by Jason Eberl » Sat, 02 Mar 2002 23:00:18


  Use the caret symbol (shift-6 on a standard US-101 Keyboard) just before
the redir symbols, i.e. "ECHO ^>^>^>^>^>^>^>^>" etc.  Normally the ^ is to
prefix "special" characters, but when you use it to prefix an aforementioned
"special" character, it makes it act like a "normal" one instead.

  Hope this helps!  :)

 - Jason


Quote:> When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the "<"

and ">" as part of the echo command.
Quote:

> How do I display these chars ?

> Thank you
> Thomas

 
 
 

How to "Echo >>>><<<<" ???

Post by Jason Eberl » Sun, 03 Mar 2002 00:44:44


Argh - ignore previous, I didn't notice the 50 million newsgroups this was
crossposted into, the group *I* saw it in had only 1 reply...

:-/


>   Use the caret symbol (shift-6 on a standard US-101 Keyboard) just before
> the redir symbols, i.e. "ECHO ^>^>^>^>^>^>^>^>" etc.  Normally the ^ is to
> prefix "special" characters, but when you use it to prefix an
aforementioned
> "special" character, it makes it act like a "normal" one instead.

>   Hope this helps!  :)

>  - Jason



> > When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the
"<"
> and ">" as part of the echo command.

> > How do I display these chars ?

> > Thank you
> > Thomas

 
 
 

How to "Echo >>>><<<<" ???

Post by Timo Sal » Sun, 03 Mar 2002 02:50:14



>   Use the caret symbol (shift-6 on a standard US-101 Keyboard) just before
> the redir symbols, i.e. "ECHO ^>^>^>^>^>^>^>^>" etc.  Normally the ^ is to
> prefix "special" characters, but when you use it to prefix an aforementioned
> "special" character, it makes it act like a "normal" one instead.

Please see the previous postings on this. In plain MS-DOS the
Unix-like quoting (\ vs ^) is not available. As posted before, the
MS-DOS solution to this problem is given e.g. at

 38) Is it possible to echo the redirection symbol in a batch?

 218093 Mar 1 2002 ftp://garbo.uwasa.fi/pc/link/tsbat.zip
 tsbat.zip Useful batch files and tricks, linked from /pc/ts, T.Salmi

   All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa

Timo's  FAQ  materials  at   http://www.uwasa.fi/~ts/http/tsfaq.html

 
 
 

How to "Echo >>>><<<<" ???

Post by to » Sun, 03 Mar 2002 10:24:21



> When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the "<" and ">" as part of the echo command.

> How do I display these chars ?

In a batchfile, use the backspace character, to erase the
required quote marks, like so:

   "#>>>>>>AAAAAA<<<<<<"#

The # in the above representing the backspace character; Alt+8/Ctrl+H.

Sometimes this kludge won't work unless you add a space or two,
or the 255 character, after the last backspace char so play it
safe and hit the spacebar a couple of times.

I've used this in vanilla DOS and DOS 7.0.

 
 
 

How to "Echo >>>><<<<" ???

Post by jacob de brui » Tue, 05 Mar 2002 18:45:09


hi tom,

i like the simplicity of your solution.
it works fine, but what DOS editor do you use to enter the backspace
character (08h) in the batch file.
you cannot enter a backspace character using EDIT, NOTEPAD or COPY CON.
(copy+paste of backspaces is seems to be problem for EDIT and NOTEPAD)
so, without any third party stuff,  how do you enter a backspace in a file.
not that i am all that purist, but i just would like to give it a try.

jacob



Quote:> > When I try to echo the string >>>>AAAA<<<<< then MS-DOS interprets the

"<" and ">" as part of the echo command.
Quote:

> > How do I display these chars ?

> In a batchfile, use the backspace character, to erase the
> required quote marks, like so:

>    "#>>>>>>AAAAAA<<<<<<"#

> The # in the above representing the backspace character; Alt+8/Ctrl+H.

> Sometimes this kludge won't work unless you add a space or two,
> or the 255 character, after the last backspace char so play it
> safe and hit the spacebar a couple of times.

> I've used this in vanilla DOS and DOS 7.0.

 
 
 

1. <><><> DELETING VARIABLES <><><>

I have a recursive function. I have a "static" variable in this function,
because the function is called many times, and also because the value shouldn't
change after the first time set. I would like to know how to delete this
variable, after I'm finished using it. The variable is an integer (if it
matters?!?). I am programming in C++, DOS (TC++ 3.0). Also, can a local static
variable be deleted by a different function, i.e. main() ?

Rob

2. Hover Buttons Are not Visible

3. <<<*<< HOW TO DISKCOPY Without Swapping diskettes >>*>>>

4. Online statement

5. ><><><>< 4DOS.COM - SIZE ><><><><

6. Logon Problem

7. ">>> READ FIRST: Frequently Asked Questions about MS-DOS batches <<<"

8. Help: Owl 2.0 Error for Creating a dialog!

9. <<>> COMPUTER SOFTWARE / HARDWARE <<>>

10. ><><><>< 4DOS.COM - S

11. <<>> COMPUTER SOFTWARE / HARDWARE <<>>