This is the script
user@linux:~$ cat script.sh
#!/bin/bash
for i in `seq $#`
do
echo $i
done
user@linux:~$
Output
user@linux:~$ ./script.sh a b c
1
2
3
user@linux:~$
Desired Output
I would like to get argument value like this .... and not just the number
user@linux:~$ ./script.sh a b c
1 - a
2 - b
3 - c
user@linux:~$
bashtag, but gave your script a.shextension, and the syntax of the file looks more likezsh(because of the unquoted variable expansions). Which is it?/bin/bash. I've updated my script above with shebang