Hi everyone I writing a simple bash script and the problem I am having is: I need to search a file with ip addresses and exec a command for each excluding the ip address that ends with .254 which in most cases is the router
for ip in `cat /home/tux/Desktop/file`
do
if [ $ip = *.254 ];then
echo this is a router
done
this is not what my script must do but if this works my script will work