I have a file, its delimiter is "|||".
abc|||123|||999|||5|||Just for you | Jim|||20
cef|||7|||210|||6|||Go away | R&B|||30
mmm|||89|||320|||16|||Traveling Light|George Winston|||21
The delimiter "|||" can't be replace with "|" or "||", because data itself may contain "|" or "||".
Could someone tell me how to sort column 2 with delimiter "|||" ?
The following method fails:
sort -t$'|||' -nrk2 a.txt > b.txt
sort: multi-character tab `|||'
Thank you!
sort -nfor the whole file without specifying a delimitersortfail to run, or does it just produce incorrect output? If it fails to run, what error message do you get? If the output is incorrect, what output do you get? Show an example of the output you get, and what you expect.