'ls' name and 'ls | grep name' different
- Reply: Michael Sierchio : "Re: 'ls' name and 'ls | grep name' different"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 09 Mar 2024 16:19:25 UTC
Bonjour, I explain it as simple as possible: :; set | egrep 'LC_A|LANG' GDM_LANG=fr_FR.UTF-8 LANG=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8 SLIM_LANG=fr_FR.UTF-8 :; ls -i 1989* ; ls -i | grep 1989 ; ls -ib 1989* ; ls -ib | grep 1989 9920 1989 Amn*??*sia.mp4 9920 1989 Amn*é*sia.mp4 9920 1989 Amn\303\251sia.mp4 9920 1989 Amn\303\251sia.mp4 We see that with ls only the accent is transformed into ?? And this is not the case with the pipe followed by grep I don't see an explanation since the pipe should not modify the ascii stream especially not by correcting the flow! Au secours ! Bien cordialement