Help in input file's in bash script

hello guys
i have bash script to open my routers with username and password
i made script but i have problem this script can/t read password from file

#!/bin/bash
router_file="ips"
passwd="password.txt"
for router in cat ;$router_file do
for pass  in cat ;$passwd; do
res=$(curl -m 1   "http://${router}" --user admin:${pass} )                                              
if echo $res | grep -i "stats"; then                                                                                       
echo "https://"$router >> log                                                                                                     
fi
done
done

How are password.txt and router_file organized?

Please use code tags, the code button: not icode.

cat password.txt
admin
adminis@@
admins@@@
cat router_file
192.168.1.1
192.168.1.2
192.168.1.3

Which password belongs with which router?

first one for the first router and the sec for the sec router

I have moved this thread to the subforum it belongs in. You shouldn't post code questions in the 'contact the moderators' forum.

If they're related, why are they different files? Then you have to do something like this:

exec 5<file1
exec 6<file2

while read ROUTER <&5 && read PASS <&6
do
        echo "do something with router $ROUTER password $PASS"
done

exec 5<&-
exec 6<&-

...when, with both in one file, you could have just done:

while read ROUTER PASS
do
        echo "do something with router $ROUTER password $PASS"
done <routerpass

thanks alot my friend

What is the semicolon doing here before $router_file ??????