[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #6474] Issue warning if recursively searching stdin
From: |
Eric Blake |
Subject: |
[patch #6474] Issue warning if recursively searching stdin |
Date: |
Tue, 20 Mar 2012 20:03:55 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 |
Follow-up Comment #6, patch #6474 (project grep):
No. You want to expand:
$ grp XXX
into
$ GREP_OPTIONS=-r grep --exclude-dir...
Notice that this is a one-shot environment modification, for just the grep
process. Don't believe me? Try this:
$ export foo=bar
$ env | grep ^foo
$ foo=blah env | grep ^foo
$ env | grep ^foo
and notice how setting an env-var immediately before the command name is a
one-shot modification of the environment seen by just that command.
You may also want to note that the bash manual recommends shell functions
rather than aliases, as in:
grp() {
GREP_OPTIONS=-r grep --exclude-dir=... "$@"
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?6474>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/