delorie.com/djgpp/doc/utils/utils_2.html   search  
DJGPP Utilities Reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. djecho

This program simply echoes whatever is given to it on the command line.

 
 Usage: djecho [-n] [-o file] [-s] [-a] args...

-n

Do not emit the trailing newline after printing the text.

-o file

Send output to a file.

-s

Separate args with a newline, instead of the default blank. This is useful for writing several lines of output in a single invocation (which is faster than several separate commands).

-a

Append the output to the file instead of overwriting it. Useful with the `-o' option.

The purpose of this program is to be able to interact directly with make's ability to pass long command lines to programs. If you use redirection, you aren't always able to handle long command lines (especially since echo is normally in `command.com'). With djecho, you can, and you can use the `-o' option to redirect output to a file (and use the file later as a response file) without using DOS's redirection.

Latest versions of ported make do not invoke `command.com' for redirection and echo commands, but djecho is still useful for related tasks, e.g. for writing several lines to a file in a single invocation. Since djecho is part of the basic DJGPP development environment, it is easy to rely on it being present when a package is built.


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Nov 2004