3 ms·
How is that different from backslash-escaped strings in C, Java, Javascript, Python, and... uh, a whole bunch of other common languages? Which of those gives y
by Karellen 4y ago
How is that different from backslash-escaped strings in C, Java, Javascript, Python, and... uh, a whole bunch of other common languages?
Which of those gives you a string with two backslashes in those other languages? Exactly the same one as (ba)sh.
- chasil 4y agoLet's have a more concrete example of ambiguity. "${*##*[ ]}" is a valid POSIX approach to getting the last parameter but it doesn't work in ksh or bash. Those shells apply the pattern to each parameter in turn when used on '*' or '@'. That text is from a developer who has profound depth. A portable method to extract the last argument is: for last do : done This ambiguity and subtlety is not good.