-1
Setting PAGER to /dev/null
as suggested through the net to prevent every command being printed in stdout issues an error under OS X 10.6:
octave:1> PAGER('/dev/null');
octave:2> 1
sh: /dev/null: Permission denied
Any way to fix this?
-1
Setting PAGER to /dev/null
as suggested through the net to prevent every command being printed in stdout issues an error under OS X 10.6:
octave:1> PAGER('/dev/null');
octave:2> 1
sh: /dev/null: Permission denied
Any way to fix this?
0
Like grawity said above, Octave is indeed expecting PAGER to be set to a program, but cat
raises an error, true
raises a broken pipe warning.
So, figured Octave was just piping output to PAGER, and fixed this by redirecting the output of a valid program to /dev/null
:
PAGER('less > /dev/null')
PAGER('true > /dev/null')
1
The error message is shown because Octave is expecting PAGER to be set to a program that can be run and given the text as 'stdin'. The /dev/null
file is obviously not a program, and it does not have the "executable" permission bot; the latter is what causes the permission error.
Try /usr/bin/cat
or /usr/bin/true
instead.
1What is the first thing you should look at? The permissions of /dev/null. What are they? From that you should be able to figure out your problem. – mdpc – 2013-05-17T20:19:51.563