Shell programming style -- a plea for better shell scripts

Henry Spencer henry at utzoo.UUCP
Tue Mar 6 11:57:07 AEST 1984


Doug Gwyn observes, in part:

	Before invoking ANY system commands, set the expected command
	search path.  This is usually:

	PATH=/bin:/usr/bin

Not quite right.  The proper incantation, one which we take some pains
to always use hereabouts, is:

	PATH=/bin:/usr/bin ; export PATH

Without that magic "export", the user's original PATH is what gets
exported to commands executed from the shell file, which means that
it can reappear without warning.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.unix mailing list