[gobolinux-users] Scripts Functions Logverbose: 2 small questions?

rubisher rubisher at scarlet.be
Mon Sep 3 20:33:13 UTC 2007


Jonas Karlsson wrote:
> On Mon, 03 Sep 2007 19:46:55 +0200, rubisher <rubisher at scarlet.be> wrote:
> 
>> Hello *,
>>
>> reading Compile stuff, I read this in LogVerbose file:
>> [snip]
>> export logMode="Normal"
>> export logLevel=${logLevelNormal}
>> [snip]
>>
>> is it by design or should I read logMode="Verbose" & logLevel=${logLevelVerbose}?
>>
> It should probably read "Verbose" instead of "Normal" but as far as I can see the effect is
> the same. There are no difference implemented atm.
> 
>> The next point is common to LogNormal and LogVerbose files but may be just a question of semantic:
>> [snip]
>> eval "exec $questionFD<&2"
>> [snip]
>>
>> which, according to bash's man, looks like imho to '[n]<&word' (sic) 'used to duplicate _input_ file descriptors'.
>>
>> And the FD you want to duplicate is 2 i.e. STDERR: an _ouput_ stream (well, what says my /usr/include/unistd.h:
>> [snip]
>> #define      STDERR_FILENO   2       /* Standard error _output_.  */
>> [snip]
>> ?
>>
> That depends on how you define input/output. :)
Obviously ;<)

> We write to stderr, therefore it is our input fd. What that code does is to copy stderr to one of our named descriptors, which we use in our scripts. That was we can use the named descriptors, but the log level decides where the output goes (right now stderr or /dev/null)
> 
Clear (will help me a lot to continue learning)

Tx,
	r.


More information about the gobolinux-users mailing list