user2726449
user2726449

Reputation: 627

Using sed to modify a header

Supposed I had a file that has the header:

exm2240_T exm4561_G exm1916_0 exm490_1 rs67856512_A

I was wondering how to get the header to appear like this using sed:

exm2240 exm4561 exm1916 exm490 rs67856512

Upvotes: 0

Views: 53

Answers (1)

choroba
choroba

Reputation: 241938

Just remove the underscore and the character that follows it:

sed 's/_.//g'

Upvotes: 2

Related Questions