I want to write a shell script which clones a file, example the name of the file to be cloned is "es" and I want its clone have the name "es1", "es2", "es3", and so on.
Then another program called service needs the former clone as input,
for example service up /home/es1, service up /home/es2 ....
I wrote this script but it doesn't work, I get the error message:
syntax error: Bad for loop variable
the following is the script
#! /bin/sh
for(i=1;i<=4;i++){
clone es es$i
service up /home/domenico/es$i
}