Skip to content
Advertisement

How can I look up a variable by name with #!/bin/sh (POSIX sh)?

JavaScript

What shell command should I use so that echo $c returns “filename1” as the output?

Advertisement

Answer

You can use eval to “nest” variable substitutions.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement