fork(1) download
  1. #!/bin/bash
  2. LIST="foo:1.0.0
  3. foo-bar:1.0.1"
  4.  
  5. VERSION=$(echo "${LIST}" | grep -P "\bfoo\b(?!-)" | cut -s -d':' -f2)
  6.  
  7. echo -e "VERSION: ${VERSION}"
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
VERSION: 1.0.0