Yes. The \r \n sequence is the carriage return typical of text files written in Windows. You stated that token is determined as output from an awk script. Does the file processed from awk come from a Windows system? If this is the case, just run
before processing the file with awk. If it has carriage returns, they will be stripped out, otherwise the file will be left untouched. See
man dos2unix for details.
As alternative you can remove the \r from within the awk program using the
sub function. For example:
Code:
sub("\r","",target)
where target can be a variable or a field like $NF.
Edit: for a detailed explanation of the sequence of characters at the end of a line of text, see the Wikipedia at the voice "Newline" and check the "Common problems" section.