fork(1) download
  1. #!/bin/bash
  2. echo 'test=${test-value} ... more text' | sed 's/.*\(\${[^}]*}\).*/\1/'
  3. echo 'test=${test-value} ... more text' | grep -oE '\${[^}]*}'
Success #stdin #stdout 0s 4568KB
stdin
Standard input is empty
stdout
${test-value}
${test-value}