[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: |
Peng Yu |
Subject: |
Re: [Help-bash] How to print a bash variable in the most succinct way? |
Date: |
Tue, 16 Aug 2016 14:44:06 -0500 |
On Tue, Aug 16, 2016 at 2:32 PM, Greg Wooledge <address@hidden> wrote:
> On Tue, Aug 16, 2016 at 02:21:52PM -0500, Peng Yu wrote:
>> How to only generate variables that are modifiable (i.e., not readonly)?
>
> If you are so incredibly lazy that you can't accept the straightforward
> solution ("make a list of all the variables I need to export, and then
> export them"), why are you not simply using the lazy person's "set -a"
> alternative to export ALL your variables?
There are situations export won't work. For example, the command `at`
(for job scheduling) by default will not use bash in scheduled job. If
I want to make sure any job scheduled must run transparently when bash
variables/functions (defined in the bash when `at` is called) are
used, users should know nothing about then bash variables/functions.
To do so, I must capture the variables and functions available in the
bash when I run `at` and make them available to the bash called by the
job when the job actually runs.
> As suggsted by Pierre Gaston in:
> http://lists.gnu.org/archive/html/help-bash/2016-08/msg00047.html
>
> You seem to be so lazy that you won't do the obvious right thing, but
> also you seem to be unwilling to accept the solution that was created
> specifically to LET PEOPLE BE LAZY. I don't know what you want.
>
> (Actually I have a theory about what you want, but I hope I am wrong.
> Nevertheless, I fear I must be right, because I have eliminated all
> of my other hypotheses.)
--
Regards,
Peng
- Re: [Help-bash] How to print a bash variable in the most succinct way?, (continued)
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Peng Yu, 2016/08/15
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Chet Ramey, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Peng Yu, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Chet Ramey, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Peng Yu, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Greg Wooledge, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?,
Peng Yu <=
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Greg Wooledge, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Chet Ramey, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Peng Yu, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Chris F.A. Johnson, 2016/08/16
- Message not available
- Message not available
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Peng Yu, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Chet Ramey, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Peng Yu, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Chet Ramey, 2016/08/16
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Peng Yu, 2016/08/17
- Re: [Help-bash] How to print a bash variable in the most succinct way?, Chet Ramey, 2016/08/17