Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: is variable with variable name possible?



2011/4/4 Jérémie Roquet <arkanosis@xxxxxxxxx>:
> 2011/4/4 zzapper <david@xxxxxxxxxx>:
>> somevar=$(pwd)
>>
>> but I want somevar to be a variable name
>
> $ eval "$somevar=$(pwd)"

Actually, the quotes aren't even needed:

$ eval $somevar=$(pwd)

-- 
Jérémie



Messages sorted by: Reverse Date, Date, Thread, Author