The htop process manager displays $'\t'
as ?
in the sort command because it interprets the \t
as a tab character, which is not a valid sorting option.
In the sort command, \t
is used as a delimiter to specify the field that the command should sort by. However, in htop, it is not a valid delimiter and is therefore displayed as ? in the sort column.
You can try to use the -k option to specify the sort field and the -t option to specify the delimiter. For example, htop -u -p -k 2,2 -t ' '
sorts by the 2nd field using a space as a delimiter.
$'\t'
sequence but instead just a 1-character tab literal that the shell parsed that sequence into.