shell script get current ip address mac code example Example: get ip mac terminal ipconfig getifaddr en0