I have a for loop that takes a CIDR that contains an illegal character for file names ("/").
part of the command is to save the output with the name of the CIDR.
for i in $(more subnets.lst);do shodan download $i-shodan net:$i;done
the download argument is followed by the result of the more command, which are the CIDR (192.168.21.0/24).
is there a way in bash to rename a variable while the loop is running ? I remember doing this years back in batch files by subtracting from the str length, but that won't help me as I just need to replace the "/" with a "-"(or any other compliant char.