fork download
  1. #!/bin/bash
  2. temp="1 1 -1 1.5 3 -2.3"
  3. echo "$temp" | grep -oP '(?<!\S)1(?!\S)' | wc -l
  4. echo "$temp" | perl -lne 'END {print $c} map ++$c, /(?<!\S)1(?!\S)/g'
Success #stdin #stdout 0s 5096KB
stdin
Standard input is empty
stdout
2
2