ls quoting non existing files
by bagpussnz from LinuxQuestions.org on (#58FD7)
Hi,
This came in post ls version 8.25.
If you do an ls of a file that doesn't exist, it puts quotes around the file in the error message.
E.g. if foo doesnt exist
# ls foo
ls: cannot access 'foo': No such file or directory
On older (pre 8.25 inclusive), you get,
# ls foo
ls: cannot access foo: No such file or directory
None of the quoting-style options change this.
Any ideas? I can potentially put alias and functions in place, but seems overkill.
It's for an automated regression system with expected output.
Cheers,
Ian


This came in post ls version 8.25.
If you do an ls of a file that doesn't exist, it puts quotes around the file in the error message.
E.g. if foo doesnt exist
# ls foo
ls: cannot access 'foo': No such file or directory
On older (pre 8.25 inclusive), you get,
# ls foo
ls: cannot access foo: No such file or directory
None of the quoting-style options change this.
Any ideas? I can potentially put alias and functions in place, but seems overkill.
It's for an automated regression system with expected output.
Cheers,
Ian