Re: /dev/one - why not /dev/repeat?

Riley Williams (rhw@bigfoot.com)
Sat, 26 Dec 1998 14:39:51 +0000 (GMT)


Hi Dave.

>> What's wrong with the following C code being run as a usermode
>> program?

> Uhm, you need a compiler to make it?

So?

> Some of us like having vast amounts of power available from the
> shell, for minimal/thin client/embedded applications. This means
> small kernel additions that are vastly generic. (For vast
> flexabilty)

I like to write applications as shell scripts myself - indeed, one
regularly used shell-script of mine is a database lookup system, and
is written entirely as a bash script...

Personally, I see nothing wrong with the addition of a few small,
strategically placed C programs to provide needed functionality that's
not available from the relevant shell. As an example, in one shell
script I wrote recently, I needed at one point to calculate the common
logarythm of a number, and was unable to find any way to do this from
bash itself, so I wrote a short C program that does that, then called
it from the relevant points within the script.

However, even that's not needed in this case, as it can be done
entirely within bash. Try the following:

Q> #!/bin/bash
Q> function spam() {
Q> while [ -z '' ]; do
Q> echo -n "$* "
Q> done
Q> }
Q> spam This is a test > /tmp/stupidity

That does exactly what my previous C-based example did, and uses
nothing that isn't part of bash itself. As a result, assuming that
bash is present, it will work...

> But I guess with all the narrowed minded jerk off's in this thread,
> those things aren't commonly used enough and thus not important to
> Linux. We may as well rip out serial console, /dev/nvram, initrd,
> romfs, and other such things. They are useless bloat.

How does that paragraph relate to the rest of your post? I can't see
any relationship between them...

Taking the paragraph on its own, I can confirm that the serial
console, initrd and romfs all find regular use here, although I have
to admit that I regard /dev/nvram as something that would be much
better omitted...

Best wishes from Riley.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/