Remove Empty lines and copy selected lines to new text file
Posted: 23 Jan 2018 08:59
Hi,
In my text file first of all i want to delete all the empty rows/lines.
Then where Level = 1 will be taken as first line and below line 1,2,4,6,7,9 to be copied to new text file.
Sample data
In my text file first of all i want to delete all the empty rows/lines.
Then where Level = 1 will be taken as first line and below line 1,2,4,6,7,9 to be copied to new text file.
Sample data
some data xxxxxx
some data xxxxxx
some data xxxxxx
some data xxxxxx
Level = 1
some data here.........1
some data here.........2
some data here.........3 (Delete)
some data here.........4
some data here.........5 (Delete)
some data here.........6
some data here.........7
some data here.........8 (Delete)
some data here.........9
some data xxxxxx
some data xxxxxx
some data xxxxxx
Level = 1
some data here.........1
some data here.........2
some data here.........3 (Delete)
some data here.........4
some data here.........5 (Delete)
some data here.........6
some data here.........7
some data here.........8 (Delete)
some data here.........9
some data xxxxxx
some data xxxxxx
some data xxxxxx
Result
Level = 1
some data here.........1
some data here.........2
some data here.........4
some data here.........6
some data here.........7
some data here.........9
Level = 1
some data here.........1
some data here.........2
some data here.........4
some data here.........6
some data here.........7
some data here.........9