我有一个包含示例输入内容的文件,想要按照所需输出重新排列。不确定如何用 sed 和 awk 来实现这一点。
输入样本
bni bce_merge_bni
bni def_merge_bni
bni linus_merge_bni
bni cat_merge_bni
bni ten_merge_bni
bni kit_merge_bni
us-canada chix_merge_usgenuity
us-canada cavin_merge_usgenuity
us-canada miuns_merge_usgenuity
us-canada ate_merge_usgenuity
us-canada eat_merge_usgenuity
所需输出
bni abc_merge_bni bce_merge_bni def_merge_bni linus_merge_bni cat_merge_bni ten_merge_bni kit_merge_bni
us-canada chix_merge_usgenuity cavin_merge_usgenuity miuns_merge_usgenuity ate_merge_usgenuity eat_merge_usgenuity