Search Results

Search: Posts Made By: DFr0st
4,146
Posted By Corona688
Kind of exactly how I've shown you. A="abc" ...
Kind of exactly how I've shown you.

A="abc"
B="def"

read $A$B <<<"string" ...should put the string "string" into the variable named abcdef.

This is how it's often used: read VARNAME ...but...
4,146
Posted By Corona688
This is easiest done with read. It's handy...
This is easiest done with read. It's handy because it takes a variable name, which you can construct by any means you want.

read $A$B <<<"string"
4,146
Posted By Scrutinizer
Because if $path is obtained from user input or...
Because if $path is obtained from user input or an input file, or otherwise not under your control someone could execute code with the permissions of the person executing the script.

If you are...
4,146
Posted By elixir_sinari
A not-recommended way: eval echo \$leg$path ...
A not-recommended way:
eval echo \$leg$path
By the way, I think you meant echo ${!var} instead of echo ${!leg}.
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 08:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy