Timeline for History of Bash globbing
Current License: CC BY-SA 3.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 18, 2014 at 16:36 | comment | added | ormaaj | That bash follows existing practice so carefully while avoiding irreconcilably incompatible changes and extensions is one of its greatest strengths. | |
| Jun 18, 2014 at 14:52 | vote | accept | StrongBad | ||
| Jun 11, 2014 at 1:41 | answer | added | Gilles 'SO- stop being evil' | timeline score: 9 | |
| Jun 10, 2014 at 22:53 | history | edited | Gilles 'SO- stop being evil' |
edited tags
|
|
| Jun 10, 2014 at 12:44 | answer | added | Stéphane Chazelas | timeline score: 16 | |
| Jun 10, 2014 at 12:23 | answer | added | fgeorgatos | timeline score: 1 | |
| Jun 10, 2014 at 11:58 | comment | added | ctrl-alt-delor | @StéphaneChazelas thanks for the correction. Makes one realise how much simpler globbing is, though less powerful. May be that is why they are different, regex is just to difficult for every day use, and for beginners and sometimes for me. (I will remove my original comment, so it does no harm.) | |
| Jun 10, 2014 at 11:49 | comment | added | Stéphane Chazelas |
There's not much that bash did invent. bash mostly cherry-picked features from different shells (Bourne, ksh, csh, tcsh, zsh). Globbing predates even the Bourne shell and used to be done with a glob command (only ? and * were supported then) in the first versions of Unix in the early 70s.
|
|
| Jun 10, 2014 at 11:41 | comment | added | Stéphane Chazelas |
@richard, my ^[^.].*\.txt$ was to take into account the ignoring of dot files. Note that the -regex is a GNU extensions, some shells like ksh93 or zsh can incorporate regexps in their globs (try for instance: ksh93 -c 'echo ~(E:^[^.].*\.txt$)')
|
|
| Jun 10, 2014 at 11:29 | comment | added | ctrl-alt-delor |
There are commands that operate on filenames and take regexp. For example find, find . -regex ".*\.txt$" | xargs rm --, or rename for renaming files (it is sed for filenames), beware some systems have a different rename.
|
|
| Jun 10, 2014 at 8:04 | comment | added | slm♦ | Much of your Q's are touched on in this thread from lwn: lwn.net/Articles/96687 | |
| Jun 10, 2014 at 7:59 | comment | added | Stéphane Chazelas |
Would you consider doing rm -- ^[^.].*\.txt$ instead of rm -- *.txt?
|
|
| Jun 10, 2014 at 7:20 | history | asked | StrongBad | CC BY-SA 3.0 |