9fans archive / 2006 / 08 / 147 prev next
From: Martin Neubauer <m.ne@gmx.net>
Subject: Environment variable
Date: Wed, 9 Aug 2006 14:26:20 +0200
* arisawa@ar.aichi-u.ac.jp (arisawa@ar.aichi-u.ac.jp) wrote:
>
> On 2006/08/09, at 20:39, Martin Neubauer wrote:
> >Well, now I have tried. It doesn't do the trick.
> >b=`{cat /env/a}^''
> >gives a warning if a is an empty string but works otherwise.
> >b=$`{basename /env/a}
> >is the cleanest solution, I think.
>
> The solution is same as
> b=$a
> this works if a is already a shell variable.
>
> Try
> c='' # null string
> a=()
> b=()
> cp /env/c /env/a
> then exec
> b=$`{basename /env/a}
I see what you are trying to accomplish. Probably
b=$"`{cat /env/a}
will do.