Frage

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!

War es hilfreich?

Lösung

Since you mentioned using a shell:

sed -i '3d' Glo*
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top