shell script to remove the text between all curly brackets from text file
Hello experts,
I have a text file with lot of curly brackets (both opening { & closing } ). I need to delete them alongwith the text between opening & closing brackets' pair. For ex: Input:- Code:
59. Rh1 Qe4 {(Qf5-e4 Qd8-g8+ Kg6-f5 Then the expected output:- Code:
59. Rh1 Qe4 60. Qg8+ Kf5 Many Thanks!! |
I got a solution from here - https://www.unix.com/shell-programmi...#post303019848
|
The example in the link could use a little work on a whitespace problem in its output.
Can you please elaborate a little on what your solution turned out to be? And how well did it work for your full data set? |
The two solutions of Chubler_XL produce results with two lines:
Code:
59. Rh1 Qe4 60. Qg8+ Code:
59. Rh1 Qe4 60. Qg8+ Kf5 Code:
tr " " "\n" <$InFile \ . |
All times are GMT -5. The time now is 07:47 AM. |