bug-bash
[Top][All Lists]
Advanced

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

The correct way to use "for" without polluting the environment


From: Peng Yu
Subject: The correct way to use "for" without polluting the environment
Date: Sat, 7 Mar 2015 16:31:54 -0600

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.

for x in a b c
do
  echo "$x"
done
unset x

-- 
Regards,
Peng



reply via email to

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