Timeline for GNU find and masking the {} for some shells - which?
Current License: CC BY-SA 2.5
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 6, 2015 at 22:05 | comment | added | Stéphane Chazelas | @geekosaur, {}foo would expand to foo, but {} would expand to {} (except when within backticks, but quoting would not help) and was documented as such. I verified it for the csh of 2BSD (first release), 2.79BSD, 2.8BSD and 2.11BSD. | |
| Jul 25, 2013 at 0:20 | comment | added | slm♦ | @Gilles - Thank you for creating this answer! | |
| Mar 5, 2011 at 22:30 | comment | added | user unknown | @geekosaur: Can you say which specific csh-version on which specific platform? I would prefer to test it myself (if it is possible on linux) or be assured, that the person testet it himself. | |
| Mar 5, 2011 at 20:47 | comment | added | geekosaur | That was the point. The {} syntax originated in csh, but {} expanded to the empty string. Newer shells recognize that that's nonsensical, but there are still some old cshs out there. | |
| Mar 5, 2011 at 20:44 | comment | added | Gilles 'SO- stop being evil' | @geekosaur: Yes, but what does this have to do with {}? Brace expansion (in Bourne-style shells) only triggers when there is a comma or sometimes .. between the braces, never for {}. Also, it is not condoned by POSIX, not even mentioned as an extension, but obviously you need to protect braces in the general case (not {}) since most shells out there perform it. | |
| Mar 5, 2011 at 20:18 | comment | added | geekosaur | That was bash (see $BASH_VERSION). Brace expansion is very much alive and well. | |
| Mar 5, 2011 at 19:52 | comment | added | Gilles 'SO- stop being evil' | @geekosaur: Only a small subset of markdown works in comments. I don't know what you're trying to say. If this is about ksh et al's brace expansion, read my paragraph beginning with “Ksh implements brace expansion as an incompatible extension”. | |
| Mar 5, 2011 at 19:28 | comment | added | geekosaur | 2@mress:3 B$ ls -d {te,pl}* platform-tools/ platforms/ temp/ 2@mress:4 B$ echo $BASH_VERSION 3.2.48(1)-release (hm, markup doesnt work in comments) | |
| Mar 5, 2011 at 16:21 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 2.5 |