fork(1) download
  1. #!/bin/bash
  2. f="192.168.1.1
  3. 10.135.135.2"
  4. ip=$(grep -Eo '((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' <<< "$f")
  5. echo "$ip"
Success #stdin #stdout 0s 4328KB
stdin
Standard input is empty
stdout
192.168.1.1
10.135.135.2