2

I want to be able to copy a few lines from a text file (could be a log file or a source code file) and each line should be copied with its line number.

E.g. if I copy these three lines,

Screenshot

it should NOT result in the text like usual

2016-10-26 09:00 ERROR Something bad happened
2016-10-26 09:00 NullPointerException!!!
2016-10-26 09:00 Shutting down

but as

Line 10 - 2016-10-26 09:00 ERROR Something bad happened
Line 11 - 2016-10-26 09:00 NullPointerException!!!
Line 12 - 2016-10-26 09:00 Shutting down

Ideally the text before and after the line number is configurable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.