bug-bash
[Top][All Lists]
Advanced

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

Re: bash uses tmp files for inter-process communication instead of pipes


From: Linda Walsh
Subject: Re: bash uses tmp files for inter-process communication instead of pipes?
Date: Mon, 06 Oct 2014 15:02:10 -0700
User-agent: Thunderbird



Greg Wooledge wrote:
On Mon, Oct 06, 2014 at 02:00:47PM -0700, Linda Walsh wrote:
How much of the original do you want?... wait....... um...
But the point it it should already work... I think it is trying to read
from the network.

In the code below, you have a function that *generates* a stream of
data out of variables that it has directly in memory ("$nm") and
the contents of files that it reads from disk ("$(<"$nm"/address)").
---
        That's because the 1st function parsed the output of
a command like 'ip'... it has later been optimized to not call it
but use /sys directly... BUT, there is no guarantee that I won't
have to go back to the other format for some reason.

        When I split things up it's because of NOT wanting
to take shortcuts.


On a side note, you are going out of your way to make your bash code look
like perl (alias my=declare and so on).  This is a bad idea.
---
        I don't think it is perl.  I think it is something that
saves me on typing and increases clarity

not perl:    shell equiv
array        declare -a
map          declare -A
hash         declare -A
int          declare -i
string       declare

I threw in 'my' because it is a hell of alot
shorter than declare.


This is a bad idea It means you are putting round pegs in square holes.
----
        Extra layers?  Where?
I don't throw in extra layers to make things look like perl
I throw them in to make the scripts maintainable.  I used to code
in the same fashion as all the shell books... It was unmaintainable
and illegible.  FWIW, I tried to move perl toward more legibility
and that went over less well than an icecube's chance in hell.
For them, being forced to upgrade to a POSIX standard would be
an improvement. <<<  (and you know how I feel PSX is a LowestCD) -- a
barely passing grade, like a "D".

While trying to do that with shell is, admittedly trying to put round pegs
in square holes -- one does the best one can do with the tools available.

Trying to focus on the "why"s of my algorithms and style when
you and others have indicted no desire to see the whole context in the
past, seems a bit like telling me I'm not watching the show the "right
way" and I should "ignore the man over there behind the curtain".




reply via email to

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