Reputation: 5059
I have a file of 200 rows and 1 column and in each column data appears as ch:158334782-158335532_Tb_052868_I8
what I want to do is whereever : or - or _ appears it should be replaced by a tab seperation.
the new file should look like this ch (tab) 158334782 (tab) 158335532 (tab) Tb (tab) 052868 (tab) I8
Any suggestions for a bash script...
Thank you in advance
Upvotes: 3
Views: 1304
Reputation: 63698
With tr:
tr ':\-_' '\t' < infile > outfile
With sed:
sed 's/[-_:]/\t/g' infile > outfile
Upvotes: 4