[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep: default file if -r is used
From: |
Thomas Schwinge |
Subject: |
Re: grep: default file if -r is used |
Date: |
Fri, 11 Jun 2004 20:13:14 +0200 |
User-agent: |
Mutt/1.4.2.1i |
On Fri, Jun 11, 2004 at 03:57:29PM +0200, Koblinger Egmont wrote:
> On Fri, 11 Jun 2004, Paul Jarc wrote:
>
> > FWIW, I'd prefer -R or a new option. (Even then, I'm not really happy
> > with the fact that $GREP_OPTIONS could break a script. But I suppose
> > it can already break scripts in different ways.)
>
> Sure it can... show me a script that always behaves correctly, no matter
> how I set LANG, LC_*, SHELL, SHELLOPTS, IFS, USER, HOME, _POSIXLY_CORRECT,
> _POSIX2_VERSION and a bunch of other variables... it's kind of impossible.
> Scripts always assume that you have a reasonable set of env vars.
#v+
#!/bin/sh
if [ x"$cleared_env_" != xy ]; then
exec \
env -i cleared_env_=y \
"$0" ${1+"$@"}
fi
[SCRIPT]
#v-
That should catch most of them...
;-)
Regards,
Thomas
- Re: grep: default file if -r is used, (continued)
- Re: grep: default file if -r is used, Paul Jarc, 2004/06/10
- Re: grep: default file if -r is used, Stepan Kasal, 2004/06/11
- Re: grep: default file if -r is used, Koblinger Egmont, 2004/06/11
- Re: grep: default file if -r is used, Stepan Kasal, 2004/06/11
- Re: grep: default file if -r is used, Koblinger Egmont, 2004/06/11
- Re: grep: default file if -r is used, Stepan Kasal, 2004/06/11
- Re: grep: default file if -r is used, schwinge-list-gnu-utils-bug, 2004/06/11
- Re: grep: default file if -r is used, Karl Berry, 2004/06/11
- Re: grep: default file if -r is used, Paul Jarc, 2004/06/11
- Re: grep: default file if -r is used, Koblinger Egmont, 2004/06/11
- Re: grep: default file if -r is used,
Thomas Schwinge <=
- Re: grep: default file if -r is used, Paul Eggert, 2004/06/11
- Re: grep: default file if -r is used, Stepan Kasal, 2004/06/14
- Re: grep: default file if -r is used, Charlie Gordon, 2004/06/12
- Re: grep: default file if -r is used, Paul Jarc, 2004/06/12