Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'> /dev/null 2>&1' equivalent?

0 views
Skip to first unread message

Michael G Schwern

unread,
Nov 16, 2002, 9:56:22 PM11/16/02
to macperl...@perl.org
MakeMaker defines a macro to tack onto the end of a shell command to make it
silent. DEV_NULL.

On Unix its '> /dev/null 2>&1'.
Windows defines it as '> NUL'.

MacOS Classic doesn't have a definition and that causes problems. It means
more code that really has to be is overriden in MM_MacOS.pm to strip out
$(DEV_NULL) calls.

Is there something MakeMaker can stick on the end of a command in the MPW
shell (I think its the MPW shell that MM_MacOS is typically run with) to
supress its output?


--

Michael G. Schwern <sch...@pobox.com> http://www.pobox.com/~schwern/
Perl Quality Assurance <per...@perl.org> Kwalitee Is Job One
There is a disurbing lack of PASTE ENEMA on the internet.

Chris Nandor

unread,
Nov 16, 2002, 10:48:12 PM11/16/02
to Michael G Schwern, macperl...@perl.org
At 21:56 -0500 2002.11.16, Michael G Schwern wrote:
>MakeMaker defines a macro to tack onto the end of a shell command to make it
>silent. DEV_NULL.
>
>On Unix its '> /dev/null 2>&1'.
>Windows defines it as '> NUL'.
>
>MacOS Classic doesn't have a definition and that causes problems. It means
>more code that really has to be is overriden in MM_MacOS.pm to strip out
>$(DEV_NULL) calls.
>
>Is there something MakeMaker can stick on the end of a command in the MPW
>shell (I think its the MPW shell that MM_MacOS is typically run with) to
>supress its output?

Yeah, it is also noted in test.pl:runperl():

$runperl .= " \xB3 Dev:Null" if !$args{stderr} && $is_macos;

By default, stderr and stdout are both returned together. \xB3 ("„") will
redirect STDERR. Dev:Null is the null device.

--
Chris Nandor pu...@pobox.com http://pudge.net/
Open Source Development Network pu...@osdn.com http://osdn.com/

Michael G Schwern

unread,
Nov 16, 2002, 11:20:58 PM11/16/02
to Chris Nandor, macperl...@perl.org
On Sat, Nov 16, 2002 at 10:48:12PM -0500, Chris Nandor wrote:
> Yeah, it is also noted in test.pl:runperl():
>
> $runperl .= " \xB3 Dev:Null" if !$args{stderr} && $is_macos;
>
> By default, stderr and stdout are both returned together. \xB3 ("?") will

> redirect STDERR. Dev:Null is the null device.

Is there a way to redirect both STDERR and STDOUT?


--

Michael G. Schwern <sch...@pobox.com> http://www.pobox.com/~schwern/
Perl Quality Assurance <per...@perl.org> Kwalitee Is Job One

Keep your stick on the ice.
-- Red Green

Chris Nandor

unread,
Nov 17, 2002, 8:02:04 AM11/17/02
to Michael G Schwern, macperl...@perl.org
At 23:20 -0500 2002.11.16, Michael G Schwern wrote:
>On Sat, Nov 16, 2002 at 10:48:12PM -0500, Chris Nandor wrote:
>> Yeah, it is also noted in test.pl:runperl():
>>
>> $runperl .= " \xB3 Dev:Null" if !$args{stderr} && $is_macos;
>>
>> By default, stderr and stdout are both returned together. \xB3 ("?") will
>> redirect STDERR. Dev:Null is the null device.
>
>Is there a way to redirect both STDERR and STDOUT?

Oh right, you want both. That's what I get for answering late at night.

"\xB7 Dev:Null"

\xB7 (capital sigma, "…") specifies both "output" and "diagnostic"
(STDOUT/STDERR) at the same time.

0 new messages