[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to have Bash alias on variable name
From: |
Greg Wooledge |
Subject: |
Re: How to have Bash alias on variable name |
Date: |
Sat, 9 Sep 2023 18:50:54 -0400 |
On Sat, Sep 09, 2023 at 05:57:54PM -0400, Lawrence Velázquez wrote:
> On Sat, Sep 9, 2023, at 5:02 PM, Budi wrote:
> > How do we have Bash alias for variable name e.g.
> >
> > VAR=99
> >
> > alias n=VAR
> >
> > echo $n
> >
> > # should show 99 but can't
>
> https://mywiki.wooledge.org/BashFAQ/006#Evaluating_indirect.2Freference_variables
Also <https://mywiki.wooledge.org/BashProgramming/#Functions> if the
goal is to use "pass by reference" functions.