• sik0fewl@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 days ago

    I was thinking sed, too, but to replicate the behaviour (and scene):

    echo "HOLD THE DOOR" | sed -n '
      p
      s/E//g p
      s/L//g p
      s/TH//g p
      s/ //g p
      s/DO//g p'
    

    Note: -n suppresses the default printing that sed does, so I could include the last p for symmetry and clarity 🙂