1832296 Members
1982 Online
110041 Solutions
New Discussion

at output redirection

 
SOLVED
Go to solution
Franky Leeuwerck
Frequent Advisor

at output redirection

Hello,

I have a shell script a in which I launch another script b with the command
at -f filenameOfb now

How can I prevent the system from sending all output from the other script as an email to the user ?
I don't want to add redirection statements at the end of each script statement in b.

Thanks,

Franky Leeuwerck
3 REPLIES 3
Franky Leeuwerck
Frequent Advisor

Re: at output redirection

Sorry,
Somehow this ended up in the wrong category.

Close this one. I'll resubmit it in the correct category.
Andreas Voss
Honored Contributor
Solution

Re: at output redirection

Hi,

to generally redirect all output withiun a script add a line at the top ie:

exec >/tmp/logfile 2>&1

this will redirect all stdout/stderr to /tmp/logfile

Regards
Franky Leeuwerck
Frequent Advisor

Re: at output redirection

That's quick !

Thanks a lot, I complete your answer in the question submitted in the right category.

Franky