fork download
  1. #!/bin/bash
  2. s="KBOS 052354Z 19012KT 10SM FEW075 BKN110 OVC200 24/14 A2975 RMK AO2 SLP074 T02390144 10289 20239 55002"
  3. grep -oE '\b[12][0-9]{4}\b' <<< "$s"
  4.  
  5.  
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
10289
20239