-SOLVED- Joining 3 notepads into 1 (in order -first line of each into new notepad)
-
Hi, so I have been joining 2 note pads into one just fine by:
step1. Alt+c with 1,1 spacing on both notepads ( this puts a number in front of each line)
Step2: making new notepad then coping both in the order I wanted them
step3: line operation - sort lines lexicographically accenting to put them in order
step4: replace (?-s)^.{4}(.*?\R) with \1 to removing the numbers that were place infrontExample of output:
Notepad1 line1
notepad2 line1
notepad1 line2
notepad2 line 2I then wanted to do this with 3 notpads but using the same steps as above doesnt work as expected. sometimes it puts them in the wrong order
Example of output:
Notepad1 line1
notepad2 line1
notepad3 line1
notepad1 line2
notepad3 line2 <— this is in the wrong spot
notepad2 line 2im hoping this is a simple fix or theres a extra step for doing 3
-
@no-hanks said in Joining 3 notepads into 1 (in order -first line of each into new notepad):
im hoping this is a simple fix or theres a extra step for doing 3
You just need a secondary identifier. Before doing the Alt+C to number a file, add an extra column first: in file 1, make that extra column all 1s; in file 2, make the extra columns all 2s; in file 3, make the extra column all 3s. Then do the Alt+C to put the auto-number before that.
START
file1 file2 file3 ----- ----- ----- apple awkward Andy banana boorish Barbara corn crazed Charlie
Extra Column
file1 file2 file3 ----- ----- ----- 1apple 2awkward 3Andy 1banana 2boorish 3Barbara 1corn 2crazed 3Charlie
Alt+C 1,1
file1 file2 file3 ----- ----- ----- 11apple 12awkward 13Andy 21banana 22boorish 23Barbara 31corn 32crazed 33Charlie
Copied into one
11apple 21banana 31corn 12awkward 22boorish 32crazed 13Andy 23Barbara 33Charlie
Sorted
11apple 12awkward 13Andy 21banana 22boorish 23Barbara 31corn 32crazed 33Charlie
Then delete the starting numbers.
-
@PeterJones Awesome, thanks that was a super simple fix!