fork download
  1. #!/bin/bash
  2. temp='1 1 1 1 1 -1 -1 -1 -1 -1 -1'
  3. echo "$temp" | grep -oE '(^|[^-0-9])1\b' | wc -l
Success #stdin #stdout 0s 4508KB
stdin
Standard input is empty
stdout
5