[comp.sys.ibm.pc] ECHO blank line?

sarah@laticorp.UUCP (Sarah Groves Hobart) (08/12/87)

Does anyone know the definitive way to get ECHO to echo a blank line?
(That is, the way to get ECHO to echo a blank line under just about
any version of DOS, rather than echoing "ECHO IS OFF" under some versions
and echoing a blank line under others.)

I have tried "ECHO " (ECHO, then one space), "ECHO   " (ECHO, then two spaces),
"ECHO ." (ECHO, space, period), and "ECHO" (ECHO, no arguments at all).  All
of these cause one version or another of DOS to echo something rather than
a blank line.

I am mainly concerned with 3.0 and above, but would like it to work with
2.1 and above.  I've been working with Sperry DOS, PC-DOS, and MS-DOS.

Thanks in advance!

Sarah Groves Hobart

reeves@amd.AMD.COM (JR) (08/12/87)

In article <278@laticorp.UUCP> sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
>
>Does anyone know the definitive way to get ECHO to echo a blank line?
>(That is, the way to get ECHO to echo a blank line under just about
>any version of DOS, rather than echoing "ECHO IS OFF" under some versions
>and echoing a blank line under others.)
>
>I have tried "ECHO " (ECHO, then one space), "ECHO   " (ECHO, then two spaces),
>"ECHO ." (ECHO, space, period), and "ECHO" (ECHO, no arguments at all).  All
>of these cause one version or another of DOS to echo something rather than
>a blank line.
>
>I am mainly concerned with 3.0 and above, but would like it to work with
>2.1 and above.  I've been working with Sperry DOS, PC-DOS, and MS-DOS.
>
>Thanks in advance!
>
>Sarah Groves Hobart

To ECHO a blank line use the HEX code FF after the echo
(You can  enter a 255 by holding the ALT key and typing 2 5 5
This will only work with some editors)

As a related note I have used this feature to create directories that seem
to be inaccesible to the novice user. If you create a directory called
for instance TEST<255> where <255> is the HEX FF it will look as if the 
directory is simply TEST. Actually to move to the dir you need the FF

Might be handy for some people.










J. Reeves

 

neuhaus@hplabsb.UUCP (Peter Neuhaus) (08/12/87)

Try "echo"<space><bs> where <space> is the space character and <BS>
is the backspace character (decimal 8) which can be entered from the
keyboard by holding the ALT key while typing 008 on the numeric pad.

I used PC Write as an editor. Hopefully your editor allows the entry 
of special characters using this method.

Peter
 

mdharding@watmath.waterloo.edu (Matt) (08/13/87)

In article <278@laticorp.UUCP> sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
>
>I have tried "ECHO " (ECHO, then one space), "ECHO   " (ECHO, then two spaces),
>"ECHO ." (ECHO, space, period), and "ECHO" (ECHO, no arguments at all).  All
>of these cause one version or another of DOS to echo something rather than
>a blank line.
>
>Sarah Groves Hobart

I'm sure a million people will post this, but vat the hell:

You tried every single combo except the right one: As was posted nine million  
times before on the net:

Try echo. (echo NO SPACE period). 


Disclaimer: Yeah, like I belong to Microsoft?

rusty@nmsu-ee.UUCP (08/13/87)

In DOS 3.1 entering 'echo.' echos a blank line. (echo<period> with no
space in between)

 

                               Rusty Baldwin
                               nmsu-ee!rusty

connery@bnrmtv.UUCP (08/13/87)

In article <278@laticorp.UUCP>, sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
> Does anyone know the definitive way to get ECHO to echo a blank line?
> I have tried "ECHO ", "ECHO  ", ECHO ." and "ECHO".  All of these cause
> one version or another of DOS to echo something rather than a blank line.
> 
> Sarah Groves Hobart

The only way I know of that works in all cases is the form "ECHO x" where
x is ascii character decimal 255.  It can be generated by holding down the
ALT and SHIFT keys and typing 2,5,5 on the numeric pad and then letting
them both go.  The cursor will advance one space to the right but the
character you typed will not be distinguishable from a space.  The problem
with this method of course is that you can move the last character to a
new line by mistake in an editor and not notice it.

I believe "ECHO." (no spaces) works on a number of versions of DOS as well,
it certainly works on my current DOS 3.30, but I am quite certain that it
failed on previous versions.  There are also patches to make "ECHO  " work
on all versions of DOS but these seem sort of questionable since the effect
can be achieved in other ways which are standard.
-- 

Glenn Connery, Bell Northern Research, Mountain View, CA
{hplabs,amdahl,3comvax}!bnrmtv!connery

dick@plx.UUCP (Dick Flanagan) (08/13/87)

Summary:

Expires:

Sender:

Followup-To:


In article <278@laticorp.UUCP> sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
>Does anyone know the definitive way to get ECHO to echo a blank line?

Try "ECHO."  (ECHO, period, with no intervening space between them). . .

Works every time!
-- 
Dick Flanagan, W6OLD                            Long Live Zero Print Control
UUCP:  ...!ucbvax!sun!plx!dick
GEnie: FLANAGAN

cy@ashtate (Cy Shuster) (08/13/87)

In article <278@laticorp.UUCP> sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
>
>Does anyone know the definitive way to get ECHO to echo a blank line?

You were very close: "ECHO. ", i.e. ECHO, period, space.

--Cy--

dsnow@watarts.UUCP (08/14/87)

Would you believe that you missed the answer by one space!
Echo. Will Echo a blank line. Also, I believe that ECHO<SPACE>F6 will
do the same.

sarah@laticorp.UUCP (08/18/87)

> In article <278@laticorp.UUCP> sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
> >Does anyone know the definitive way to get ECHO to echo a blank line?

[Sarah Groves Hobart's mailbox is then inundated with replies.]

Really, the avalanche of responses I've gotten to my question has been
heartwarming . . . PLEASE don't send any more!  I've long since given
up trying to reply to each and every one.  

And, finally, 

         ECHO. echos "ECHO is on" (or off) on Sperry DOS 3.1.

(Yes, that's ECHO, no space, period--anyone with access to Sperry DOS out
there knows that I speak truth.)

Sperry DOS 3.1 is one of the DOS's I have to work with.  ECHO'ing a delete
character, however, will echo a blank line on all my DOS's.  For this reason
I've gone with that option.

Again, many, many thanks for the overwhelming number of responses.

Sarah Groves Hobart
{ihnp4,amdahl,sun}!ptsfa!laticorp!sarah

steve@micomvax.UUCP (Steve Grice) (08/19/87)

In article <58200013@hplabsb.UUCP> neuhaus@hplabsb.UUCP (Peter Neuhaus) writes:
>Try "echo"<space><bs> where <space> is the space character and <BS>
>is the backspace character (decimal 8) which can be entered from the
>keyboard by holding the ALT key while typing 008 on the numeric pad.
>
>I used PC Write as an editor. Hopefully your editor allows the entry 
>of special characters using this method.
>
>Peter
> 

It's a lot easier to type ECHO:


-- 

Steve Grice                               "For all you do
...philabs!micomvax!steve                    disk bugs for you"

brianc@cognos.uucp (Brian Campbell) (08/19/87)

In article <278@laticorp.UUCP> sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
> Does anyone know the definitive way to get ECHO to echo a blank line?

   I don't know if its the definitive way or not, but "echo." (no space
between echo and the dot) will do the trick.  This works in DOS 3.1 'fer
sure.
-- 
Brian Campbell          uucp: decvax!utzoo!dciem!nrcaer!cognos!brianc
Cognos Incorporated     mail: 3755 Riverside Drive, Ottawa, Ontario, K1G 3N3
(613) 738-1440          fido: sysop@163/8

ado@elsie.UUCP (Arthur David Olson) (08/23/87)

> > Does anyone know the definitive way to get ECHO to echo a blank line?
> 
>    I don't know if its the definitive way or not, but "echo." (no space
> between echo and the dot) will do the trick.  This works in DOS 3.1 'fer
> sure.

Good enough.  Now--how about echoing an *empty* line?  Use the command
	echo. > result
then examine the result file and note the space character at the beginning
of the file.  Is that space character important?  You bet.  Try
	echo. | date
(which ought to allow you to display the date without getting prompted
for a new date) to see why.
-- 
UUCP: elsie!ado		Elsie and Ado are trademarks of Borden, Inc. and Ampex.

agnew@trwrc.UUCP (R.A. Agnew) (08/26/87)

In article <14286@watmath.waterloo.edu> mdharding@watmath.waterloo.edu (Matt) writes:
>In article <278@laticorp.UUCP> sarah@laticorp.UUCP (Sarah Groves Hobart) writes:
>>
>You tried every single combo except the right one: As was posted nine million  
>times before on the net:
>
>Try echo. (echo NO SPACE period). 
>
Sorry, but like the man said this either prints "ECHO is on" or 
"ECHO is off" on MS DOS V3.10 and most others. There are patches
to DOS (version dependant) to fix this.