4
rated 0 times
[
4]
[
0]
/ answers: 1 / hits: 8803
/ 1 Year ago, wed, january 11, 2023, 11:21:32
I am trying to write a bash script to print values of the 3 variables. Keep getting errors. What am I doing wrong?
INPUT1=/tmp/dir1
INPUT2=/tmp/dir2
INPUT3=/tmp/dir3
for i in 1 2 3
do
echo $(INPUT$i)
done
When I run this script, tho output is:
syntax error: operand expected (error token is "/tmp/dir1
More From » bash