fork(7) download
  1. #!/bin/bash
  2. s="system.switch_cpus_1.commit.refs 2682887 # Number of memory references committee"
  3. echo "$s" | grep -Ewo '[0-9]+'
  4. echo "-------------"
  5. echo "$s" | grep -Eo '\b[0-9]+\b'
  6. echo "-------------"
  7. echo "$s" | grep -Eo '\<[0-9]+\>'
Success #stdin #stdout 0s 4536KB
stdin
Standard input is empty
stdout
2682887
-------------
2682887
-------------
2682887