fork download
  1. #!/bin/bash
  2. s='956,938,987,964,1004,934,1018,912,1,12,123'
  3.  
  4. echo All multi digit numbers with one decimal
  5. echo $s | sed 's/\B\([0-9]\)\b/.\1/g'
  6. echo
  7. echo Numbers with at least three digits
  8. echo $s | sed 's/\B\([0-9]\)\([0-9]\)\b/\1.\2/g'
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
All multi digit numbers with one decimal
95.6,93.8,98.7,96.4,100.4,93.4,101.8,91.2,1,1.2,12.3

Numbers with at least three digits
95.6,93.8,98.7,96.4,100.4,93.4,101.8,91.2,1,12,12.3