DragonFly kernel List (threaded) for 2008-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: Globbing
"Simon 'corecode' Schubert" wrote:
>likewise, with find for subdirs (not POSIX):
>
>find . -name '*.el" -exec sh -c 'for f; do [ -f "${f}c" ] || echo "$f"; done' dummy {} +
which gives me
bash: syntax error near unexpected token `do'
The reason is a mismatched quote pair around *.el, which I only
realised when cut-and-pasting your command into emacs with syntax
highlighting enabled. I'm impressed that you sent it without trying
it first, and got it right except for a trivial typo. But for the
rest of us, doing non-trivial things with the shell is often not worth
the effort.
For me already python is faster, and not just in terms of thinking
things through. For example, I tried creating 100,000 files and
removing them with the "rm" function that you suggested a few emails
ago. It did the job but took a good long time, and this is a fairly
fast opteron workstation. In that time, I could have written a python
program to parse a list of files and remove each one....
A more powerful shell is badly needed. (I believe zsh and others are
vast improvements on bash, I should check them out.) Of course, not a
topic for kernel@...
Rahul
- References:
- Re: Globbing
- From: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]