henkf@dnlunx.pttrnl.nl (Henk Fictorie) (11/30/90)
In a bat file I would like to ECHO the special characters: < > | &. I know how to do it in 4DOS (using the escape character ^X). I would like to know, how I can do it in command.com. Is there also an escape character or should I provide the ASCII code (if so, how) or do something else?? -- Henk Fictorie, PTT Research Neher Labs, H_Fictorie@pttrnl.nl P.O. box 421, ...!hp4nl!dnlunx!henkf 2260 AK Leidschendam, The Netherlands Phone : +31 70 3326356
rmich@Lise.Unit.NO (Rolf Michelsen) (11/30/90)
Henk Fictorie (henk@dnlunx) asks how to echo the special characters < > & | from a batch file. I haven't tested this, but the standard way of passing special characters as parameters is to enclose the entire parameter in double quotes. You could try something like this: ECHO "this is a <silly> test"
fisher@sc2a.unige.ch (12/03/90)
henkf@dnlunx.pttrnl.nl (Henk Fictorie) writes: > In a bat file I would like to ECHO the special characters: < > | &. rmich@Lise.Unit.NO (Rolf Michelsen) replies: > I haven't tested this, but the standard way of passing special characters as > parameters is to enclose the entire parameter in double quotes. You could > try something like this: ECHO "this is a <silly> test" This works, but you'll see the double quotes. I didn't find any good way to display these characters - special to command.com - using DOS. Many replacements of DOS' echo provide ways to display them, or to skip the final CR-LF. BTW: such a program (quite trivial to, really) is in queue for posting in c.b.i.p. It's called `write', and uses the `prompt' syntax for special characters ($e=ESC, $l='<', $g='>', etc.).