Error redirection "2>/dev/null" doesn't work

  • Follow


Any ideas why erorrs for unavailable files (for example which are in 
config.lst defined but not on the filesystem) are not redirected???

ls `cat config.lst` | /usr/sfw/bin/tar -T - -cf - 2>/dev/null | gzip -9 
> backup/configs.tar.gz

It neither works with /bin/sh nor with /bin/bash under Solaris 9.

Any ideas?

Thank you in advance.

Cheers,

R. 

0
Reply not13 (52) 3/3/2008 3:13:13 PM

On 2008-03-03, Robert Langdon <not@home.net> wrote:
> Any ideas why erorrs for unavailable files (for example which are in 
> config.lst defined but not on the filesystem) are not redirected???
>
> ls `cat config.lst` | /usr/sfw/bin/tar -T - -cf - 2>/dev/null | gzip -9 
>> backup/configs.tar.gz
>
> It neither works with /bin/sh nor with /bin/bash under Solaris 9.
k

maybe you need to redirect 2> from the ls output, not tar

i

>
> Any ideas?
>
> Thank you in advance.
>
>
> R. 
>
0
Reply Ignoramus32544 3/3/2008 3:27:51 PM


On 2008-03-03 16:27:51 +0100, Ignoramus32544 
<ignoramus32544@NOSPAM.32544.invalid> said:


> maybe you need to redirect 2> from the ls output, not tar
> 
> i

Certainly, after thumbing my nose on it, its obvious.

Thank you very much!

0
Reply not13 (52) 3/3/2008 3:47:50 PM

On 2008-03-03, Robert Langdon <not@home.net> wrote:
> On 2008-03-03 16:27:51 +0100, Ignoramus32544 
><ignoramus32544@NOSPAM.32544.invalid> said:
>
>
>> maybe you need to redirect 2> from the ls output, not tar
>> 
>> i
>
> Certainly, after thumbing my nose on it, its obvious.
>
> Thank you very much!

The bill is on its way

i
0
Reply Ignoramus32544 3/3/2008 3:50:45 PM

On 2008-03-03 16:50:45 +0100, Ignoramus32544 
<ignoramus32544@NOSPAM.32544.invalid> said:

>> 
>> Certainly, after thumbing my nose on it, its obvious.
>> 
>> Thank you very much!
> 
> The bill is on its way
> 
> i

;-).

0
Reply not13 (52) 3/3/2008 9:19:38 PM

4 Replies
60 Views

(page loaded in 0.093 seconds)

Similiar Articles:













7/26/2012 3:30:05 PM


Reply: