Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!cmcl2!brl-adm!umd5!decuac!dolqci!stein From: stein@dolqci.UUCP (Mike Stein) Newsgroups: comp.unix.questions Subject: System V newgrp Keywords: group Message-ID: <722@dolqci.UUCP> Date: 24 Dec 87 16:48:12 GMT References: <4718@well.UUCP> <6866@ncoast.UUCP> <1014@bakerst.UUCP> Reply-To: stein@dolqci.UUCP (Mike Stein) Distribution: na Organization: Dept. of Labor, Unemployment Insurance Lines: 19 I experienced one "gotcha" with the System V 'newgrp' command. When doing a 'newgrp', you are given a new environment REGARDLESS OF THE SUCCESS OR FAILURE OF THE COMMAND. What does this mean? After your 'newgrp', all shell variables previously marked for export are no longer so marked, and all unexported variables are lost. This happens even if you make a typo and try to change to a group that doesn't exist (e.g., 'newgrp fo' when you meant 'newgrp foo'.) If you do this and then correct your typo without re-exporting everything, you end up with no environment variables left other than the "builtins" (and I'm not even sure about those). - Mike Stein ... uunet!vrdxhq!dolqci!stein U. S. Dept. of Labor / 200 Constitution Ave. NW Rm. S-4519 / Washington DC 20210 / (202) 535-0640 The above represents the Absolute Truth. Therefore it could not possibly have been written or approved by the U. S. Government.