Better IP bash script not using any temporary files!