خرید بک لینک

I have 10000 files in a directory. I would like to erase lines so that I keep 2 lines in the header, 2 lines at the tail, and every 100th line in the middle.

For instance:

#header1
#header2
0     x y
1     x y
...
100   x y
101   x y
...
80000 x y
#tail1
#tail2

should become

#header1
#header2
0     x y
100   x y
200   x y
...
80000 x y
#tail1
#tail2

What is the most efficient and easy way to do this? I have around 20 directories with 10000 such files of varying length that I have to truncate.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 16 ارديبهشت 1395 ساعت: 21:56

صفحه بندی