Re: The correct way to use "for" without polluting the environment
From:
Eduardo A . Bustamante López
Subject:
Re: The correct way to use "for" without polluting the environment
Date:
Sat, 7 Mar 2015 17:54:50 -0600
User-agent:
Mutt/1.5.20 (2009-12-10)
On Sat, Mar 07, 2015 at 04:31:54PM -0600, Peng Yu wrote:
> Hi, I use unset to remove x from the environment once the for loop is
> finished. Is it the best way to do in bash? Thanks.
First, use the help-bash mailing list for this kind of queries.
Second, unless you used 'export x', then the 'x' parameter won't be in
the environment. But, if by environment you really mean the current
shell variables, then... why do you care?