Hello, spent a couple days trying to find a solution to what seems like a simple task. Basically I'm would like to print my current ip address but minus 1. For example, if my ip address was 192.168.0.5, then print 192.168.0.4. I've tried a couple combinations but always getting some errors. Any guru's can suggest a solution to this? Thanks
ADDRESS="'ifconfig |grep 'addr:' |cut -f2 -d ":"'"
let "NEWADDRESS=$ADDRESS-1"
printf "$ADDRESS"
too many errors and don't know what I've done wrong.
ADDRESS="'ifconfig |grep 'addr:' |cut -f2 -d ":"'"
let "NEWADDRESS=$ADDRESS-1"
printf "$ADDRESS"
too many errors and don't know what I've done wrong.