문제

I want to remove the second line of several files (there are like 200). All files begin with Glo so i want to do a command or a shell to remove all second lines for that file:

Example:

Glo1:
1 AAA
2 BBB
3 the third line

Glo2:
1 DDD
2 RRR
3 the third line

What i want is to delete only the second line, so files will look like this:

Glo1:
1 AAA
2 the third line

Glo2:
1 DDD
2 the third line

Regards!

도움이 되었습니까?

해결책

Since you mentioned using a shell:

sed -i '3d' Glo*
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top