bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting Redirection in Bash


From: Carol Anne Ogdin
Subject: Re: Detecting Redirection in Bash
Date: Tue, 11 Mar 2003 16:14:14 -0800


Thanks for your response, Paul.

1.  At http://mail.gnu.org/mailman/listinfo/bug-bash I read "User discussion of BASH also occurs here.."  If the policy has changed, you might want to have GNU.org change the information at that page.  Thanks for the reference to the newsgroup; I'll post my query there, too.  (It's a surprisingly active list, and one I hadn't known about.)

2.  I understand that if I don't do any redirection at all, everything is sent to the system stdout (and stderr, which is nominally /dev/tty.  However, what I'm trying to accomplish is to send the output to a file (not a device), so I can process is for debugging information.  Perhaps there's a way in bash to change the definition of stdout without redirection that could perform the function I need?  That could be risky, of course, because should the script abort, there'd be no automatic way to restore the stdout => /dev/tty definition.

--Carol Anne
Carol Anne Ogdin http://www.net-working.com 530/295-3657
Deep Woods Technology, Inc. http://www.deepwoods.com address@hidden
Leveraging technology to restore the soul of the organization




address@hidden (Paul Jarc)

03/11/2003 10:05 AM

       
        To:        Carol Anne Ogdin <address@hidden>
        cc:        address@hidden
        Subject:        Re: Detecting Redirection in Bash



Carol Anne Ogdin <address@hidden> wrote:
> I'm trying to figure out how to make all stdout (e.g., from an echo
> command) go out to the same file where bash's output is being
> redirected.

That's what happens if you don't use any redirections at all.

This list is for bash bugs/development.  For future help with writing
scripts, news:comp.unix.shell is the place to go.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]