Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コード行があります
eval echo \$$var
文字列を出力します。この文字列を変数に格納するにはどうすればよいですか?
このような:
eval c=\$$var
より適切で安全な方法は、間接化を使用することです。
c=${!var}
newVariable=$(eval echo \$$var)