Skip to main content
added 15 characters in body
Source Link
ilkkachu
  • 141.4k
  • 16
  • 249
  • 418

System:

  • Ubuntu 22.04.3 LTS
  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • ls (GNU coreutils) 8.32

Situation:

$ touch "N'*"
$ ls
'N'\''*'

"GNU Coreutils - Quoting File names" states:

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25 

'Don'\''t README.txt'   ## version 8.25


$ ls 

"Don't README.txt"      ## version 8.26 and later
“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25 

'Don'\''t README.txt'   ## version 8.25


$ ls 

"Don't README.txt"      ## version 8.26 and later  

(bug22696#19)

Question: Is someone able to explain the difference in handling of the single quote between the above example and my file?

System:

  • Ubuntu 22.04.3 LTS
  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • ls (GNU coreutils) 8.32

Situation:

$ touch "N'*"
$ ls
'N'\''*'

"GNU Coreutils - Quoting File names" states:

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25 

'Don'\''t README.txt'   ## version 8.25


$ ls 

"Don't README.txt"      ## version 8.26 and later  

(bug22696#19)

Question: Is someone able to explain the difference in handling of the single quote between the above example and my file?

System:

  • Ubuntu 22.04.3 LTS
  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • ls (GNU coreutils) 8.32

Situation:

$ touch "N'*"
$ ls
'N'\''*'

"GNU Coreutils - Quoting File names" states:

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25 

'Don'\''t README.txt'   ## version 8.25


$ ls 

"Don't README.txt"      ## version 8.26 and later
(bug22696#19)

Question: Is someone able to explain the difference in handling of the single quote between the above example and my file?

Change quoted block to code block to show backslashes properly
Source Link
Kusalananda
  • 338.9k
  • 37
  • 682
  • 991

System:

  • Ubuntu 22.04.3 LTS
  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • ls (GNU coreutils) 8.32

Situation:

$ touch "N'*"
$ ls
'N'\''*'

"GNU Coreutils - Quoting File names" states:

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25

'Don'''t README.txt' ## version 8.25

$ ls

"Don't README.txt" ## version 8.26 and later

(bug22696#19)

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25 

'Don'\''t README.txt'   ## version 8.25


$ ls 

"Don't README.txt"      ## version 8.26 and later  

(bug22696#19)

Question: Is someone able to explain the difference in handling of the single quote between the above example and my file?

System:

  • Ubuntu 22.04.3 LTS
  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • ls (GNU coreutils) 8.32

Situation:

$ touch "N'*"
$ ls
'N'\''*'

"GNU Coreutils - Quoting File names" states:

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25

'Don'''t README.txt' ## version 8.25

$ ls

"Don't README.txt" ## version 8.26 and later

(bug22696#19)

Question: Is someone able to explain the difference in handling of the single quote between the above example and my file?

System:

  • Ubuntu 22.04.3 LTS
  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • ls (GNU coreutils) 8.32

Situation:

$ touch "N'*"
$ ls
'N'\''*'

"GNU Coreutils - Quoting File names" states:

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25 

'Don'\''t README.txt'   ## version 8.25


$ ls 

"Don't README.txt"      ## version 8.26 and later  

(bug22696#19)

Question: Is someone able to explain the difference in handling of the single quote between the above example and my file?

Became Hot Network Question
Source Link

ls output display a file named "N'*" as "N'\''*"

System:

  • Ubuntu 22.04.3 LTS
  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • ls (GNU coreutils) 8.32

Situation:

$ touch "N'*"
$ ls
'N'\''*'

"GNU Coreutils - Quoting File names" states:

“Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26:

$ touch "Don't README.txt"

$ ls-8.25

'Don'''t README.txt' ## version 8.25

$ ls

"Don't README.txt" ## version 8.26 and later

(bug22696#19)

Question: Is someone able to explain the difference in handling of the single quote between the above example and my file?