[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "exit" doesn't work from inside of PIPED read block

From: Blaine Simpson
Subject: Re: "exit" doesn't work from inside of PIPED read block
Date: Mon, 19 Nov 2007 12:52:39 -0500
User-agent: Thunderbird (X11/20071114)

Bob Proulx wrote:
>>> Why are you using the -p option?
>> To prevent possible side effects from inheriting shell functions from
>> current environment, SHELLOPTS, any settings in $ENV, etc.  Why would I
>> want to have all that crap in my environment if my goal is to test
>> exactly what I have coded in my script?
> #!/bin/bash -p
> If you have crap in your environment then you should fix that problem
> first.  It led me to believe that you were trying to run a setuid
> script or something.
By "all that crap", I meant "All that stuff which is unnecessary for the
task at hand."  Everything in my environment is useful, but that doesn't
mean I want it influencing shell scripts.  I write a lot of
cross-platform shell scripts for use by other people.  It does not do to
test these with my own personal customizations.  When I am testing base
Bash behavior, like in this case, I want to test with a basic Bash
environment, not a customized one where personal settings may mask a
problem with default Bash behaior, or even be the cause of the problem
at hand.

If Bash had a setting to not inherit customizations without modifying
uid behavior, I wouldn't need to use misleading switches.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]