1 - You don't want to "echo iwconfig", because that will print the literal string "iwconfig" to the output, rather than actually running the program iwconfig
2 - You don't want double || between the iwconfig and the grep, double || is an "or" statement, if you want to grep the output of the iwconfig you would use a single |
3 - You can't run an if statement on this command anyway. If you run iwconfig | grep "Access Point", the result will either be "Access Point" or just a blank string, either way the if statement won't know what to do with it.
4 - You don't need a semicolon after each line
I would use the -q flag in grep, then check the exit status
Code:
#!/bin/bash
iwconfig | grep -q "Access Point"
if [[ $? -eq 0 ]]; then
ifdown wlan0
ifup wlan0
fi