fork download
  1. #!/bin/bash
  2. s='BBB-m
  3. BBB
  4. BBB-a
  5. BBB-w'
  6. sed -E 's~^(.*\s)?BBB(\s|$)~// &~' <<< "$s"
Success #stdin #stdout 0.01s 5512KB
stdin
Standard input is empty
stdout
BBB-m
// BBB
BBB-a
BBB-w