Path: utzoo!mnetor!uunet!mcvax!inria!ircam!mf From: mf@ircam.UUCP (mf) Newsgroups: comp.unix.wizards Subject: Re: Safely modifying a passwd file (in a perl script, e.g.) Message-ID: <412@ircam.UUCP> Date: 4 Mar 88 06:25:25 GMT References: <411@ircam.UUCP> Organization: Inst. de Rech. et Coord. Acoustique-Musique, Paris Lines: 6 Keywords: passwd vipw perl sh csh 4.2bsd Summary: A shorter way A shorter way to do this in sh is to make use of the fact that a simple command can be invoked while passing it an environment variable. So in sh one will say: EDITOR="cp /tmp/newpasswd" /etc/vipw and in the corresponding perl script system('EDITOR="cp /tmp/newpasswd" /etc/vipw');