fork download
  1. #!/bin/bash
  2. s='Text start
  3. ... <field outputName="location"> ...
  4. End of text.'
  5. sed '/<field outputName="location".*>/s/.*//' <<< "$s"
Success #stdin #stdout 0.01s 5356KB
stdin
Standard input is empty
stdout
Text start

End of text.