#!/usr/bin/perl =begin metadata Name: echo Description: echo arguments Author: Randy Yarger, randy.yarger@nextel.com License: perl =end metadata =cut use strict; my ($VERSION) = '1.2'; exit if not @ARGV; my ($N) = 1; if ($ARGV [0] eq '-?') { $0 =~ s{.*/}{}; print <<EOF; Usage: echo [-n] [arguments] Displays the command line arguments, seperated by spaces. Options: -n: Do not print a newline after the arguments. -?: Display usage information. EOF exit; } do { $N = 0; shift; } if $ARGV[0] eq '-n'; print join ' ', @ARGV; print "\n" if $N; exit; __END__ =pod =head1 NAME echo - echo arguments =head1 SYNOPSIS echo [-n] [arguments...] =head1 DESCRIPTION echo prints the command line arguments seperated by spaces. A newline is printed at the end unless the '-n' option is given. =head2 OPTIONS I<echo> accepts the following options: =over 4 =item -n Do not print a newline after the arguments. =item -? Print out a short help message, then exit. =back =head1 ENVIRONMENT The working of I<echo> is not influenced by any environment variables. =head1 BUGS I<echo> has no known bugs. =head1 AUTHOR The Perl implementation of I<echo> was written by Randy Yarger, I<randy.yarger@nextel.com>. =head1 COPYRIGHT and LICENSE This program is copyright by Randy Yarger 1999. This program is free and open software. You may use, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to do the same. =cut