fork download
  1. #!/bin/bash
  2. s="Hello there Cory Klein
  3. Have fun
  4. Hello there Samantha Rodgers"
  5. echo "$s" | perl -lpe 's/Hello there\s*\K(.*)/$1=~s#\S#X#gr/ge'
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
Hello there XXXX XXXXX
Have fun
Hello there XXXXXXXX XXXXXXX