List Info

Thread: mount question




mount question
country flaguser name
United States
2007-06-26 07:38:12
I am trying to troubleshoot an existing script and have
located the point of failure. Before I make any changes I
need to know what the bolded entry is doing/for:

mount /dev/dsk/$disk /mnt [b]2>/dev/null[/b]

I know that if I leave it off everything will work, but does
anyone have an idea what the bolded part is trying to do?

Thx!
DY
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discussopensolaris.org

Re: mount question
country flaguser name
United States
2007-06-26 09:52:58
> I am trying to troubleshoot an existing script and
> have located the point of failure. Before I make any
> changes I need to know what the bolded entry is
> doing/for:
> 
> mount /dev/dsk/$disk /mnt [b]2>/dev/null[/b]
> 
> I know that if I leave it off everything will work,
> but does anyone have an idea what the bolded part is
> trying to do?

Yup, it tries to guide you to opsol-help (the forum/mailing
list)
where you can post as many help requests as you want.

Enough for constructive, helpful trolling.

Back to your question:
The 2 is the descriptor for the error output (stderr).
The > is redirecting all things to the following channel
or file.
The /dev/null is a device which is something like a black
hole in your unix system.

So, every error message is redirected into nothing.
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discussopensolaris.org

Re: mount question
country flaguser name
United States
2007-06-26 10:20:51
Hi Doug.

It quiets error messages by routing stderr to the bit
bucket.

    Thanks,
    Jack

Doug wrote:
> I am trying to troubleshoot an existing script and have
located the point of failure. Before I make any changes I
need to know what the bolded entry is doing/for:
>
> mount /dev/dsk/$disk /mnt [b]2>/dev/null[/b]
>
> I know that if I leave it off everything will work, but
does anyone have an idea what the bolded part is trying to
do?
>
> Thx!
> DY
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> opensolaris-discuss mailing list
> opensolaris-discussopensolaris.org
>   

_______________________________________________
opensolaris-discuss mailing list
opensolaris-discussopensolaris.org

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )