I've been trying to start a number of terminals based on a variable i
and execute a command in each of them:
#!/bin/bash
read number
for ((i=1;i<=number;i++))
do
xterm -e 'cockroach start --insecure --store="node${i}"'
done
However it doesn't seems to replace ${i}
for me in the parameter of the command. I've tried using --store=node${i}
, --store=node$i
or --store="node" + ${i}
none seem to work.
Anything I'm doing wrong?