|
|
Error redirection "2>/dev/null" doesn't work
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: Write to stderr? - comp.lang.rexx... la la la 1>&2" /* this is what lots of webpages say should work, but doesn't ... This is error message line 2" errorline.4 = "This line won't be ... null test_std 2>/dev/null ... cron continues to email when no stdout/stderr from script - comp ...This is easy; I didn't redirect errout, only stdout. ... Without the pipe, that won't happen. It'll need to be ... mailx -s "text goes here" username@domain.com > /dev/null 2 ... Crontab issues with Solaris 10 - comp.unix.solaris... path/ to/script.sh > /dev/null 2>&1 As far as I can tell, this syntax is correct. The problem is, it doesn't work, the ... yes, when I run it by hand it doesn't error ... How to test if stdout == stderr? - comp.unix.programmer... fstat(2) and compare both st_dev and st_ino to know if two file descriptors point to the same inode. I don't think it would work ... what he doesn't ... Redirect stderr ... GAWK: A fix for "missing file is a fatal error" - comp.lang.awk ...... dev/null )" etc. > >(except the fact that one usually doesn't post that to a newsgroup) > 1) The above is ugly. 2) The ... error in this situation stinks. You could work ... a unix script to send email notification when a sas batch job ...... see that the first one doesn't ... output that you don't care about, you could redirect standard output to /dev/null to ... And, you might want to redirect standard error as ... Grep string with spaces - comp.unix.shellNot found" error from sh, as if the <snip> I ... ALIASIP} " /etc/rc2.d/S70ipalias > /dev/null 2>&1 then ... ALIASIP\t" > /etc/hosts` ] > > That doesn't seem to work, though. Convert string : Upper to lower - comp.unix.solaris... doing the translation the right way round doesn't= > work ... sake. :) $ echo "hello world" |dd conv=ucase 2>/dev/null ... Plotting error bars in semilogy scale - comp.soft ... booting solaris in single user mode with root filesystems read ...That doesn't work for me because my "a" partition is swap ... after booting "boot -a -s" as system file "/dev/null ... Error writing ufs log state problem - comp.sys.sun ... Error 403 Forbidden forwarding from Apacha to Tomcat - comp.lang ...Hi, I am trying to create 2 separate environments (dev and test) on ... do http://server2, > Apache still can't redirect to ... server. > So it seems that your apache doesn't ... BASH Shell Redirect Output and Errors To /dev/nullExplains how to redirect output and errors to /dev/null ... by using command >/dev/null syntax. However, this will not work when command will use the standard error (FD # 2). redirect stderr to dev/null in bash env. - The UNIX and Linux Forumsredirect stderr to dev/null in bash env. ... That doesn't work. It still outputs that -j is an ... d etc ;; \?) echo "$opt" 2>/dev/null ; exit ... 7/26/2012 3:30:05 PM
|
|
|
|
|
|
|
|
|