fork download
  1. #!/bin/bash
  2. s='Blah-1233455
  3. Affx-74537382
  4. Some line here
  5. Affx-4374575
  6. End of text 123456778.'
  7.  
  8. sed -E 's/^Affx(-[0-9]+)/rs\1/' <<< "$s"
Success #stdin #stdout 0.01s 5444KB
stdin
Standard input is empty
stdout
Blah-1233455
rs-74537382
Some line here
rs-4374575
End of text 123456778.