User Tools

Site Tools


start:debugging:linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

start:debugging:linux [2022/05/19 18:57]
rodolico created
start:debugging:linux [2022/06/01 21:46] (current)
rodolico
Line 13: Line 13:
  
 /​etc/​default/​rpcbind is called in the startup scripts, so this will add /usr/bin to the path when nfs is started. /​etc/​default/​rpcbind is called in the startup scripts, so this will add /usr/bin to the path when nfs is started.
 +
 +===== sort gives unexpected results =====
 +
 +Ran into a problem on Devuan (Debian) Linux where sort did not give expected results.
 +
 +INPUT: ​
 +<code text f.dat>
 +02-175CB:D
 +022C11EE:D
 +02-2D270:D
 +</​code>​
 +
 +<code bash>​sort f.dat</​code>​ returns
 +<​code>​
 +02-175CB:D
 +022C11EE:D
 +02-2D270:D
 +</​code>​
 +
 +Run under FreeBSD and also <code bash>​perl -e '​@a=(<>​);​chomp(@a);​print join($/,​sort @a).$/;'​ <​f.dat</​code>​ returns
 +<​code>​
 +02-175CB:D
 +02-2D270:D
 +022C11EE:D
 +</​code>​
 +Which I expected.
 +
 +Under Linux, you can get the same results by setting the collate first: <code bash>​LC_COLLATE=C sort f.dat</​code>​
 +
 +I tracked this down from a similar problem using //ls// on Linux. See https://​unix.stackexchange.com/​questions/​35469/​why-does-ls-sorting-ignore-non-alphanumeric-characters.
 +
  
 ===== Links ===== ===== Links =====
-* https://​lists.debian.org/​debian-user/​2018/​10/​msg01012.html+  ​* https://​lists.debian.org/​debian-user/​2018/​10/​msg01012.html 
 +  * https://​unix.stackexchange.com/​questions/​35469/​why-does-ls-sorting-ignore-non-alphanumeric-characters
start/debugging/linux.1653004626.txt.gz · Last modified: 2022/05/19 18:57 by rodolico