help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to print a bash variable in the most succinct way?


From: Pierre Gaston
Subject: Re: [Help-bash] How to print a bash variable in the most succinct way?
Date: Tue, 16 Aug 2016 18:50:36 +0300

On Tue, Aug 16, 2016 at 6:47 PM, Peng Yu <address@hidden> wrote:

> On Tue, Aug 16, 2016 at 7:38 AM, Greg Wooledge <address@hidden>
> wrote:
> > On Mon, Aug 15, 2016 at 10:36:23PM -0500, Peng Yu wrote:
> >> https://www.gnu.org/software/parallel/env_parallel.html
> >
> > "env_parallel is a shell function that exports the current environment
> > to GNU parallel."
> >
> > GRRAAAHHHHHHH!!!  NO!  STOP IT!  STOP IT!!!
> >
> > Seriously.  WASN'T Node.js BAD ENOUGH?!
> >
> > Why do people keep DOING THIS?!
> >
> >> env_parallel uses something like `declare -p` to extract the current
> >> environment so that the variables and functions in the current bash
> >
> > DO YOU KNOW HOW TO MAKE THE ENVIRONMENT AVAILABLE TO YOUR CHILD
> PROCESSES?
> >
> > I WILL TELL YOU!
> >
> > YOU DO NOTHING.
> >
> > NOTHING!
> >
> > YOU DO NOTHING.
> >
> > THE ENVIRONMENT IS AUTOMATICALLY AVAILABLE TO CHILD PROCESSES.
> >
> > THAT IS WHAT IT MEANS TO BE THE ENVIRONMENT.
> >
> > THAT IS THE ENTIRE POINT OF HAVING AN ENVIRONMENT.
> >
> >
> >
> >
> > OK, now listen up.  I know you think I am an asshole now.  Maybe I am.
> > Too bad.  I am going to try to pound some sense into you anyway.
> > Because I'm too stupid to stop trying.
> >
> > When you invoke a child process such as GNU parallel, it inherits
> > the environment from its parent.
>
> Only the exported variables can be inherited. But I don't want to
> export every variables as it will make my code more difficulty to
> read.
>

there is "set -a" Mark variables which are modified or created for export.


reply via email to

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