fork(1) download
  1. #!/bin/bash
  2. s='VERSION="20.04.3 LTS (Focal Fossa)"'
  3. awk 'match($0, /^VERSION="([^"]*)"/, m) {print m[1]}' <<< "$s"
  4. sed -n '/^VERSION="\([^"]*\)".*/s//\1/p' <<< "$s"
Success #stdin #stdout 0.01s 5592KB
stdin
Standard input is empty
stdout
20.04.3 LTS (Focal Fossa)
20.04.3 LTS (Focal Fossa)