
/*
 * echo
 */

/*)BUILD	$(TKBOPTIONS) = {
			TASK	= ...ECH
		}
*/

#ifdef	DOCUMENTATION

title	echo	Echo Arguments to Standard Output
index		Echo Arguments to Standard Output

synopsis

	echo [argument list]

description

	Echo writes its arguments on the standard output file.
	It is primarily used to debug the Decus library.

author

	Martin Minow

bugs

	Except as a test of the library, or to write information to
	a batch log file, echo is not useful.

#endif

#include <stdio.h>

#define	START	1
char	*$$prmt	= "echo: ";

main(argc, argv)
int	argc;		/* Number of arguments				*/
char	*argv[];	/* Argument vector				*/
/*
 * Note: in order to print the program (or command) name, change START
 * from 1 to 0.
 */
{
	register int i;

#ifdef vms
	argc = getredirection(argc,argv);
#endif

	for (i = START; i < argc; ++i) {
		printf("%s", argv[i]);
		putchar(((i + 1) >= argc) ? '\n' : ' ');
	}
}
