I have a problem with moving a defined text block (“PT”) to the end of its previous line.. for eg, consider the following :-
100001,-6.0704
PT
100061,19.1127
100122,8.1831
PT
I need that to be :-
100001,-6.0704PT
100061,19.1127
100122,8.1831PT
I have a large irregularly repeating data like this.. and need to achieve this..(moving the “PT” to currentline-1″)
I have Notepad++ I need to achieve this somehow.. maybe using spreadsheets? online tools? and how? macros? batch files?
try this as a first attempt
this batch file iterates over all the lines of the a.txt file, storing each line in the variable
prevline, if it happens to find the ‘PT’ string it spits the stored line and concatenates the PT, if it happens not to find the PT string, it spits just the stored line and stores the new line.For a further explanation, see
help forandhelp set.