Advertisement

08.08.2007 at 02:14AM PDT, ID: 22748742
[x]
Attachment Details

exec redirect keeps file pointer

Asked by NickUpson in Operating Systems Development, Linux Programming, Shell Scripting

Tags: exec, redirect, file

I have a script that includes

exec 1>> /var/log/unb/dblog.log

later logrotate renames the file to ...dblog.log.1 as expected but the script continues writing to the same file so the dblog.log.1 just gets bigger rather than starting to write to a new dblog.log as I expected. how can I get my expected behaviourStart Free Trial
[+][-]08.08.2007 at 03:09AM PDT, ID: 19652723

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.08.2007 at 04:15AM PDT, ID: 19653017

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.08.2007 at 04:58AM PDT, ID: 19653213

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.08.2007 at 05:09AM PDT, ID: 19653269

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Operating Systems Development, Linux Programming, Shell Scripting
Tags: exec, redirect, file
Sign Up Now!
Solution Provided By: ravenpl
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628