Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Saving error return code in a pipeline



    Hi all :)

    Maybe I'm asking for something impossible, or maybe I'm just dumb
enough to not see the obvious solution...

    I have a script which returns an error code, but it outputs a lot
of info, so I call it like this:

    script.install |& tee install.log

    Obviously this 'masks' the return code, but I want to see the
output even though I'm saving it to a file, so a redirection doesn't
fit me well. I can use MULTIOS, of course, but I don't want to use it
for all my commands...

    Is there any better solution than this?:

    script.install >(tee install.log) 2>&1

    Thanks a lot in advance :))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...



Messages sorted by: Reverse Date, Date, Thread, Author