I have a plain text file where newline character in not "\n"
but a special character.
Now I want to sort this file.
Is there a direct way to specify custom new-line character while using unix sort
command?
I don't want to use a script for this as far as possible?
Please note the data in text file have \n
, \r\n
, and \t
characters(the reason for such data is application specific so please don't comment on that).
The sample data is as below:
1111\n1111<Ctrl+A>
2222\t2222<Ctrl+A>
3333333<Ctrl+A>
Here Ctrl+A
is the newline character.