🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.apple2
Article #17

v001SRC012: Echo Command Line Arguments

#17
From: Jonathan A. Chandross
Date: Sat, 01 Dec 1990 21:45
49 lines
1234 bytes
Submitted-by: NONE
Posting-number: Volume 1, Source:12
Archive-name: util/echo
Architecture: ANY_2
Version-number: 1.00

This C program echoes its command line arguments.  Just like the Unix
version.

Enjoy.

=echo.c
-
-/*
- *
- * echo.c
- *
- * Print out the command line arguments one after the other.  Output
- * is terminated with a newline.
- *
- * Usage:
- *	echo [arg_1] [arg_2] [arg_3] [...]
- *
- *	If no arguments are specified echo does nothing.
- *
- * Contributed Anonymously.  Written: November 1983
- *
- * Version 1.00
- *
- */
-
-#include "stdio.h"
-
-#define BLANK ' '
-#define NL    '\n'
-
-main( argc, argv )
-int argc ;
-char *argv[] ;
-{
-	int i ;
-
-	for( i=1 ; i < argc ; i++ )
-		printf("%s%c", argv[i], (i<argc-1) ? BLANK : NL) ;
-
-}
-
+ END OF ARCHIVE
Technical Details
Message-ID: <Dec.1.16.45.32.1990.24615@yoko.rutgers.edu>
Path: arc1-ca.pugleaf.net!wuarchive!usc!rutgers!aramis.rutgers.edu!paul.rutgers.edu!yoko.rutgers.edu!jac

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!wuarchive!usc!rutgers!aramis.rutgers.edu!paul.rutgers.edu!yoko.rutgers.edu!jac
From: jac@yoko.rutgers.edu (Jonathan A. Chandross)
Newsgroups: comp.sources.apple2
Subject: v001SRC012:  Echo Command Line Arguments
Message-ID: <Dec.1.16.45.32.1990.24615@yoko.rutgers.edu>
Date: 1 Dec 90 21:45:33 GMT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 49
Approved: jac@paul.rutgers.edu