bugGNU Octave - Bugs: bug #54898, "diary" function does...


bug #54898: "diary" function does not save the output of "system" function calls

Submitted by:  Kai Torben Ohlhus <siko1056>
Submitted on:  Fri 26 Oct 2018 11:14:25 AM UTC  
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 30 Oct 2018 03:25:49 PM UTC, comment #1: 

In a similar vein, anything that gets printed to STDERR is also not captured by diary.  Sample session:

octave:1> diary tst.diary
octave:2> x = pi
x =  3.1416
octave:3> y = fprintf (stderr, "Hello World\n");
Hello World
octave:4> diary off

As you can see, in the session, "Hello World" is printed to the screen.  But, the file tst.diary doesn't show it.

octave:2> x = pi
x =  3.1416
octave:3> y = fprintf (stderr, "Hello World\n");
octave:4> diary off

Rik <rik5>
Project Administrator
Fri 26 Oct 2018 11:14:25 AM UTC, original submission:  

A small observation using "diary" and "system" in the following context:

diary somefile.txt
system ("ls -la")
diary off

The resulting file "somefile.txt" contains:

octave:2> system ("ls -la")
ans = 0
octave:3> diary off

In Matlab R2018b you can see the actual file listing as shown inside Octave.

Kai Torben Ohlhus <siko1056>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by siko1056 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-30 rik5 Priority5 - Normal => 3 - Low
        StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.5