fork(51) download
  1. #!/bin/bash
  2. s="(555)555-1212
  3. (555)555-1213
  4. (555)555-1214
  5. (666)555-1215
  6. (777)555-1217"
  7. sed -E 's/(\(555\))(.*-)(.*)/Area code: \1 Second: \2 Third: \3/' <<< "$s"
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
Area code: (555) Second: 555- Third: 1212
Area code: (555) Second: 555- Third: 1213
Area code: (555) Second: 555- Third: 1214
(666)555-1215
(777)555-1217