I used stat on two different versions of Ubuntu and it printed different types of quotes.
14.04 (coreutils 8.21-1ubuntu5.1):
$ stat --format %N test.txt
‘test.txt’
16.04 (coreutils 8.25-2ubuntu2):
$ stat --format %N test.txt
'test.txt'
Why does stat
use this uncommon quoting style in the older version and is there a way to tell stat
which type of quotes it should use?
Edit
I know that in version 8.26 quoting style was introduced for stat (https://savannah.gnu.org/forum/forum.php?forum_id=8745):
stat --format=%N for quoting file names now honors the
same QUOTING_STYLE environment variable values as ls.
But prior to this change there should be a consistent behavior between the versions or were there other changes I'm not aware of?
en_US.UTF-8
on both