What's the command which is used to remove every fourth line in a file? As these lines contain garbled characters.
Asked
Active
Viewed 41 times
0
-
1Possible duplicate of [How can I delete every Xth line in a text file?](https://stackoverflow.com/questions/9894986/how-can-i-delete-every-xth-line-in-a-text-file) – Aserre Dec 01 '17 at 08:56
1 Answers
1
Try this.
awk 'NR%4 != 0' filename

Kaushik Nayak
- 30,772
- 5
- 32
- 45
-
What does the garbled content look like? Is it possible that you have an internationalisation issue, instead? – Dragonthoughts Dec 01 '17 at 08:57