You can execute:
nmap -n -sn 192.168.1.0/24 -oG - | awk '/Up$/{print $2}'
Quick rundown of options and commands:
-nturns off reverse name resolution, since you just want IP addresses. On a local LAN this is probably the slowest step, too, so you get a good speed boost.-snmeans “Don’t do a port scan.” It’s the same as the older, deprecated-sPwith the mnemonic “ping scan.”-oG -sends “grepable” output to stdout, which gets piped toawk./Up$/selects only lines which end with “Up”, representing hosts that are online.{print $2}prints the second whitespace-separated field, which is the IP address.