I'd like to change the variable used within a bash loop. I'd like the first iteration to echo "/path/to/lol/hello_foo" and the second "/path/to/lol/hello_bar".
But instead, this is printed:
/path/to/lol/fname_one
/path/to/lol/fname_two
Here's the code:
#!/bin/bash
path_data='/path/to/lol'
fname_one='hello_foo'
fname_two='hello_bar'
for count in one two
do
echo $path_data/fname_$count
done