Is it possible to detect local IP address and store it as a variable in linux script

view full story

http://stackoverflow.com – I discovered only last week with help on here that I could have the OS Architecture (32/64) stored in a variable like this: arch=$(getconf LONG_BIT) I am hoping that I can use a similar method for local IP address: ipaddress=$(????) So that any occurrences of $ipaddress will be replaced with "" or whatever the local IP might be (HowTos)