View Single Post
Posts: 18 | Thanked: 0 times | Joined on Jan 2010
#3
Originally Posted by calvin_42 View Post
Code:
[[ -n `cat /proc/net/route | grep wlan0` ]] && gpo update && gpo download
should work pretty good.
You command seems to always return true and execute the second command. However by reading about the '-n ' in bash, i came up with the following which seems to work:

Code:
test=`cat /proc/net/route | grep wlan0`
[[ -n "$test" ]] && gpo update && gpo download
Thx for the help!