Why does wrapping output in quote create extra quote after?

Viewed 31

I want to ls -name a folder and wrap the result between the quotes`. However the result make an extra quote after.

> (ls -name) -replace '(.*)', '"$1"'
"apple"""
"orange"""
"dog"""
"cat"""

Why is that?

0 Answers
Related