On Fri, 19 Aug 2005 15:26:27 GMT, max(01)* <[EMAIL PROTECTED]> wrote: > hi. > > i was wondering, what's the simplest way to echo the standard input to > the standard output, with no modification. > > i came up with: ... > but i guess there must be a simpler way. > > using bash i simply do 'cat', *sigh*! ... > ps: in perl you ca do this: > > ... > while ($line = <STDIN>) > { > print STDOUT ("$line"); > } > ...
Actually, in perl it's easier than that, if you can tolerate that it also filters file(s) given on the command-line: while(<>) { print; } or even: #!/usr/bin/perl -p ; Of course, not every programming language needs to have easy-to-use filtering capabilities at the core. /Jorgen -- // Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu \X/ algonet.se> R'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list