各数字と文字の間にタブ文字を追加する

各数字と文字の間にタブ文字を追加する

ファイルの数字と文字を区別するためにタブ文字を追加したいと思います。

71aging
1420anatomical_structure_development
206anatomical_structure_formation_involved_in_morphogenesis
19ATPase_activity
46autophagy
2634biological_process

これで、次のようになります。

71  aging
1420  anatomical_structure_development
206  anatomical_structure_formation_involved_in_morphogenesis
19  ATPase_activity
46  autophagy
2634  biological_process

一行ありますか?sedこれのために?

ベストアンサー1

以下はあなたの要件を満たすためのsedライナーです。

 sed "s/^[0-9]*/&\t/g" filename

出力

71      aging
1420    anatomical_structure_development
206     anatomical_structure_formation_involved_in_morphogenesis
19      ATPase_activity
46      autophagy
2634    biological_process

おすすめ記事