[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The 'source x' command doesn't keep variables set by x when source o
From: |
#!microsuxx |
Subject: |
Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command |
Date: |
Thu, 14 Nov 2024 01:25:47 +0100 |
another code is
if u wanna not use . or eval or bash cmd
( . is source )
shopt -s expand_aliases
alias script=" $( < user.bash ) "
script
On Thu, Nov 14, 2024, 1:10 AM #!microsuxx <fxmbsw7@gmail.com> wrote:
> also u need to $log
> may i ask what criteria ur scripts are about
>
> a $log can be
>
> log=/tmp/my.log.$USER.$SRANDOM
>
> On Thu, Nov 14, 2024, 1:04 AM #!microsuxx <fxmbsw7@gmail.com> wrote:
>
>> maybe ur email formats it wrong
>> those are two lines , by greg
>> not one
>>
>> anyway if u append more than one cmd to logfile
>> more than one source cmd
>> u need to use >>logfile instead of >logfile
>>
>> On Thu, Nov 14, 2024, 1:00 AM #!microsuxx <fxmbsw7@gmail.com> wrote:
>>
>>>
>>>
>>> On Thu, Nov 14, 2024, 12:57 AM Yuri <yuri@rawbw.com> wrote:
>>>
>>>> On 11/13/24 15:44, Greg Wooledge wrote:
>>>> > If the "user script" runs quickly enough, then: source userscript
>>>> > >logfile 2>&1 cat logfile
>>>>
>>>>
>>>> This would fail to save the user script's output in case it would
>>>> execute "exit 1"
>>>>
>>>
>>> the >logfile makes it overwrite
>>> just from the two quoted lines
>>>
>>>>
>>>>
>>>> Yuri
>>>>
>>>>
>>>>
>>>>
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, (continued)
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, #!microsuxx, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, #!microsuxx, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Yuri, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, #!microsuxx, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, #!microsuxx, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Greg Wooledge, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Yuri, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, #!microsuxx, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, #!microsuxx, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, #!microsuxx, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command,
#!microsuxx <=
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Greg Wooledge, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Martin D Kealey, 2024/11/13
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Yuri, 2024/11/14
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Chet Ramey, 2024/11/14
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Martin D Kealey, 2024/11/15
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Robert Elz, 2024/11/16
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Martin D Kealey, 2024/11/16
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Oğuz, 2024/11/16
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Chet Ramey, 2024/11/16
- Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command, Martin D Kealey, 2024/11/18