[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: script bug

From: Yoshinori K. Okuji
Subject: Re: script bug
Date: Sun, 7 May 2006 16:58:14 +0200
User-agent: KMail/1.8.2

On Sunday 07 May 2006 13:40, Marco Gerards wrote:
> Yeah, the get_line was broken from the beginning...  I think it should
> be even possible to remove this function because we do not really need
> it.

I believe that get_line should be kept. Suppose that you have this kind of 
config file:

1: do something
2: do another thing
3: do yet another thing

To execute these lines, it is not necessary to keep all the three lines in 
memory, since they can be executed line by line. You can say that the 
consumed memory is not that much, but I don't think this is a good way of 
programming. Whenever possible, I think it is better to save memory.

BTW, could you describe how the scripting engine is supposed to work? For 
example, suppose that you have this (the syntax is not very important here):

if test -f /boot/kernel; then
  kernel /boot/kernel

Is it possible to tell a line at a time to the scripting engine, and let it 
execute this code block once "fi" is inputted? BASH deals with command lines 
in this way.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]