Here is a file that contains:
+
-
+ <>cow apple</>
- apple
+ ball
+ +
- -
+ -
- +
+ !
-
-
+
+ $
+ **
+ *
+ =
+ #
- ?
- ◊
+ ◊◊
-
-
Expect output:
+ <>cow apple</>
- apple
+ ball
+ +
- -
+ -
- +
+ !
+ $
+ **
+ *
+ =
+ #
- ?
- ◊
+ ◊◊
How to remove line that starts with + or - followed by empty space only?
Here is code which gives expected result but better solution would be very helpful. Since I am running this cmd on large file and has to be accurate.
sed ‘/^[^[:alnum:]]* $/d’