fork download
  1. #!/bin/bash
  2. s='Student;Grade;Comment;
  3. Eric;1;None;
  4. Smith;2;None;
  5. Thomas;1;None;
  6. Chad;3;Nice work;'
  7. sed -E 's/(Eric|Chad);[0-9]*/\1;2/g' <<< "$s"
Success #stdin #stdout 0.01s 5496KB
stdin
Standard input is empty
stdout
Student;Grade;Comment;
Eric;2;None;
Smith;2;None;
Thomas;1;None;
Chad;2;Nice work;