I have this little script here:
#!/bin/bash
for i in {"$@"}
do
echo "fping -g $@"
done
fping command in used for scanning purposes.
I want to feed it with multiple arguments but when I execute the script it passes all positional parameters at the same time.
fping -g 1 2 3 4
fping -g 1 2 3 4
fping -g 1 2 3 4
fping -g 1 2 3 4
My goal is to have it like this :
fping -g 1
fping -g 2
fping -g 3
fping -g 4
Could you help?