10
rated 0 times
[
10]
[
0]
/ answers: 1 / hits: 952
/ 1 Year ago, wed, march 8, 2023, 3:38:23
Lets say I have the following file:
$ cat test.txt
a
-----
b
-----
-----
c
-----
-----
-----
d
-----
e
-----
-----
Now I want to remove all the -----
, but only if they're repeating after each other. So the result should look like this:
a
-----
b
-----
c
-----
d
-----
e
-----
I tried grep -Pvz -- "-----
, but that didn't work.
-----"
More From » command-line