help-bash
[Top][All Lists]
Advanced

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

Re: How to have Bash alias on variable name


From: alex xmb ratchev
Subject: Re: How to have Bash alias on variable name
Date: Sat, 9 Sep 2023 23:47:04 +0200

On Sat, Sep 9, 2023, 23:03 Budi <budikusasi@gmail.com> wrote:

> How do we have Bash alias for variable name e.g.
>
>  VAR=99
>
>  alias n=VAR
>

~ $ alias myvar='n=foo ' v2='n2=foo '
~ $ myvar v2 ; declare -p n n2
declare -- n="foo"
declare -- n2="foo"
~ $



 echo $n
>
>  # should show 99 but can't
>
>
> One sincerely help
>
>


reply via email to

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