[comp.sys.ibm.pc] Getting a null line.

roper@uw-june.UUCP (Michael Roper) (08/23/87)

In article <7466@elsie.UUCP>, ado@elsie.UUCP (Arthur David Olson) writes:
- 
- 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.

No whitespace is needed around redirection or pipe symbols.  Just use
'echo.> result' and 'echo.| date' to do what you want.

You can also use the whitespace before redirection to your advantage.  
I like a space between my prompt and the cursor.  I originally used 
ansi.sys to get it, but naturally got strange results when running on 
machines with different console drivers.  I wanted a portable solution 
and found that 'prompt $p$g > nul' would always work.


-- 
Mike Roper
                                      *  Ice Cream...
ARPA:  roper@june.cs.washington.edu   *
UUCP:  ihnp4!uw-beaver!uw-june!roper  *  ...it's not just for dessert anymore.