3 ms·
Does this work as desired? "$(dirname "$file")" Is $file not actually quoted here? Since the quoted bits are "$(dirname " ")"
by emmelaich 3y ago
Does this work as desired?
"$(dirname "$file")"
Is $file not actually quoted here? Since the quoted bits are
"$(dirname "
")"
- two_handfuls 3y agoThis will correctly nest the quotes, yes. It’s somewhat counter-intuitive, but it works.
- gpvos 3y ago$() is a quote, like ``, and the "$file" is entirely within it, so it should work.
- emmelaich 3y agoThanks. I had thought the " quote was parsed / used much earlier in the tokenisation for sh.