Eric Blake wrote:
[snip] And be aware that my suggested alias is not perfect
(think exit codes, among other things
alias find='_find() {
local result;
trap "set +f; trap SIGINT" SIGINT
find "$@";
result=$?;
set +f;
trap SIGINT
return $result;
}; set -f; _find'
An improvement?
--
> > And notice that since there are no .h files in the current
> > directory, the shell passes the glob through unchanged
> > to find. You can also do 'shopt -s nullglob' to change that.
> I've wondered about this. Does bash special case the find command then?
> Which other commands does is specia
Eric Blake wrote:
Using find, I didn't protect spec in -name (-name 'spec') in a couple of
instances but they still worked, viz-a-viz:
$ find /home/lowella -type f -name *.h
/home/lowella/CVSROOT/src/newlib/doc/ansidecl.h
...
whereas a couple of others didn't work, viz-a-viz:
$ find /home/lowella
> Using find, I didn't protect spec in -name (-name 'spec') in a couple of
> instances but they still worked, viz-a-viz:
> $ find /home/lowella -type f -name *.h
> /home/lowella/CVSROOT/src/newlib/doc/ansidecl.h
> ...
> whereas a couple of others didn't work, viz-a-viz:
> $ fin
Using find, I didn't protect spec in -name (-name 'spec') in a couple of
instances but they still worked, viz-a-viz:
$ find /home/lowella -type f -name *.h
/home/lowella/CVSROOT/src/newlib/doc/ansidecl.h
...
$ find /home/lowella -type f -name *.pl
/home/lowella/test/examp001.p
5 matches
Mail list logo