The sort command has a parameter “-t” to declare the fields separator instead of the default blank. For example:
sort -t 'a' file
what if I want to use a non-printable char as the spearator, like the fifth char in ASCII table ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a special quoting in bash, that can be used for this purpose. Try the following command and look for
$'...'in the bash manual: