i***r 发帖数: 1035 | 1 folks,
i have a file like this:
1 123 abc
2 123 bcd
3 234 aoi
now i want:
aaa1 123 abc
aaa2 123 bcd
aaa3 234 aoi
basically i want to add aaa to the first number in a line. how to do it?
thanks, |
w****w 发帖数: 521 | 2 sed 's/^/aaa/' filename
【在 i***r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : folks, : i have a file like this: : 1 123 abc : 2 123 bcd : 3 234 aoi : now i want: : aaa1 123 abc : aaa2 123 bcd : aaa3 234 aoi : basically i want to add aaa to the first number in a line. how to do it?
|
i***r 发帖数: 1035 | 3 谢谢!我发现你经常帮助人!
我用了
awk '{print aaa$1 $2}' 也行 |
i***r 发帖数: 1035 | 4 谢谢!我发现你经常帮助人!
我用了
awk '{print aaa$1 $2}' 也行 |
x****o 发帖数: 21566 | |