help-bash
[Top][All Lists]
Advanced

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

Re: i cant see whats the issue, .. ps1 + propt command + date


From: Alex fxmbsw7 Ratchev
Subject: Re: i cant see whats the issue, .. ps1 + propt command + date
Date: Sat, 25 Sep 2021 22:47:43 +0200

yea i found that out ( rusty coding ) just a few ago in the last mails i sent
thanks anyway much

On Sat, Sep 25, 2021 at 10:46 PM Chet Ramey <chet.ramey@case.edu> wrote:
>
> On 9/25/21 3:09 PM, Alex fxmbsw7 Ratchev wrote:
>
> > i havent tried ( exactly ) the your two examples but i did with mine,
> > just on the term with --norc
> > it bugs..
> >
> > alias s='_s=$( declare -p 2>&- IFS ) ' r='eval "${_s:-unset -v IFS}" '
> > now=$EPOCHREALTIME s IFS=. now2=( $now ) r ; declare -p now2
> > bash: declare: now2: not found
>
> It's not a bug in bash, and it doesn't have anything to do with whether
> or not the aliases end in spaces.
>
> All of this crap ends up as
>
> now=$EPOCHREALTIME _s=$( declare -p 2>&- IFS ) IFS=. now2=( $now ) eval
> "${_s:-unset -v IFS}" ; declare -p now2
>
> All of the assignment statements preceding the `eval' are part of the
> temporary environment and do not persist beyond that command. It's just
> that simple.
>
> It might be a useful exercise to think about how your alias farm expands
> and what the shell actually sees when it goes to execute the command.
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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