Re: echo to stderr
From: Bill Verzal (BVerzal_at_KOMATSUNA.COM)
Date: 08/20/03
- Previous message: Bill Verzal: "Re: echo to stderr"
- Maybe in reply to: Bill Verzal: "echo to stderr"
- Next in thread: Aaron W Morris: "Re: echo to stderr"
- Reply: Aaron W Morris: "Re: echo to stderr"
- Reply: Mark Lamport: "Oracle on AIX 5.2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 20 Aug 2003 08:01:04 -0500 To: aix-l@Princeton.EDU
Ahh yes - but my original post called for not using shell redirects.
Thanks - BV :)
--------------------------------------------------------
Bill Verzal
AIX Administrator, Komatsu America
(847) 970-3726 - direct
(847) 970-4184 - fax
|---------+---------------------------->
| | Aaron Morris |
| | <aaronmorris@MIND|
| | SPRING.COM> |
| | Sent by: IBM AIX |
| | Discussion List |
| | <aix-l@Princeton.|
| | EDU> |
| | |
| | |
| | 08/19/2003 05:45 |
| | PM |
| | Please respond to|
| | IBM AIX |
| | Discussion List |
| | |
|---------+---------------------------->
>-------------------------------------------------------------------------------------------------------------------------------|
| |
| To: aix-l@Princeton.EDU |
| cc: |
| Subject: Re: echo to stderr |
>-------------------------------------------------------------------------------------------------------------------------------|
Jim McDonald wrote:
> Hi
>
>
> #!/usr/bin/perl
> my $input = <STDIN> ;
> print STDERR "$input" ;
>
>
> Regards
> Jim McDonald
Actually it would be:
#!/usr/bin/perl
print STDERR @ARGV;
print STDERR "\n";
but you would have to run it like `script.pl "Text to STDERR"` so that
the entire text is placed in the first element of the array. Otherwise
spacing is lost.
Using perl would probably be a little :-) more memory intensive than a
simple C program.
I just though of a shell script that should work:
#!/usr/bin/ksh
exec 1>&2
echo $@
-- Aaron W Morris <aaronmorris@mindspring.com> (decep)
- Previous message: Bill Verzal: "Re: echo to stderr"
- Maybe in reply to: Bill Verzal: "echo to stderr"
- Next in thread: Aaron W Morris: "Re: echo to stderr"
- Reply: Aaron W Morris: "Re: echo to stderr"
- Reply: Mark Lamport: "Oracle on AIX 5.2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]