7
rated 0 times
[
7]
[
0]
/ answers: 1 / hits: 4989
/ 2 Years ago, fri, january 7, 2022, 1:04:29
I have a text file and I want to delete random lines from a range. Here is an example:
Line 1: abcd
Line 2: efgh
Line 3: ijkl
Line 4: mnop
Line 5: qrst
Line 6: uvwxyz
Out of these six, I want to randomly delete, say, 3.
How to get that done? It would be great if there is a solution in vim, so one can apply it on different ranges.
More From » command-line