Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

[Discuss] rsync v. cp in data migration



One last point:

On Sat, May 25, 2013 at 09:32:02AM -0400, Greg Rundlett (freephile) wrote:
> # we will use a prepared file 'users' whose contents are a list of users,
> one user per line
> while read USER

The variable $USER is set for you by the system when you log in, and
some things may depend on it (this is a very old Unix feature, and
I've forgotten which--most things should no longer do this, for the
reason I'm describing now).  If you change the value of $USER, any
such things may break.  Generally the convention is to use upper case
names for environment variables (i.e. things you want to have
persistence across sessions/processes/etc.), and shell scripts should
use lower case names for their variables to avoid unintended conflicts
like this.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org