We are doing automation to databases where we have one script is calling another script in the shell. Forex :-

```
first-script.sh arg1 agr2 arg3 [Suppose 3 arguments are passed, then we have to call second-script.sh 3 times]
#!/bin/bash 
./second-script.sh $1 
./second-script.sh $2 
./second-script.sh $3 

```

How can we remove this dependency? We want something like if 2 arguments are passed then automatically first script should run like

```
first-script.sh arg1 agr2
#!/bin/bash 
./second-script.sh $1 
./second-script.sh $2 

```

and if 5 arguments are passed then, it should run like

```
first-script.sh arg1 agr2 arg3 arg4 arg5 
#!/bin/bash 
./second-script.sh $1 
./second-script.sh $2 
./second-script.sh $3
./second-script.sh $4 
./second-script.sh $5 

```