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

Re: Need bash-programmer for file-rc



On Tue, 31 Mar 1998, Martin Schulze wrote:

> I'm the maintainer of the file-rc package.  File-rc is a replacement
> for the old /etc/rc?.d system.  It manages the startup scripts in one
> single file /etc/runlevel.conf.
>
> This package contains a replacement for update-rc.d.  In order to
> increase speed it is written in bash and not in perl.  Unfortunately
> the original update-rc.d was improved and so they're not completely
> compatible.
>
> I'm mostly talking about constructs like
>
>    update-rc.d netbase start 20 0 1 2 . start 10 S . stop 90 4 5 6 .

i think you're mistaken that bash will be faster than perl for this.

the overhead of executing sed (and/or awk and/or perl) numerous times to
parse argument lists like this will more than offset the time needed to
load the perl interpreter once and compile the script once.

also, parsing args like these is quite difficult in bash, but trivial in
perl...and the perl code to do so is already written in the standard
update-rc.d


BTW, i really *like* to do neat things with bash and sed and other
tools, but there is a point where the complexity of the task makes it
just not worth the effort of doing something with them - when it is much
easier and faster to develop the same thing in perl.....and the final
program ends up running several orders of magnitude faster.

craig

--
craig sanders

Reply to: