Path: utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!nosc!ucsd!rutgers!iuvax!pur-ee!j.cc.purdue.edu!ksb From: ksb@j.cc.purdue.edu (Kevin Braunsdorf) Newsgroups: comp.unix.wizards Subject: ${PARAM-'echo word'} vs ${PARAM='echo word'} Summary: I need help here. Keywords: sh(1), shell, parameter, defaults Message-ID: <8649@j.cc.purdue.edu> Date: 6 Jan 89 03:58:10 GMT Reply-To: ksb@j.cc.purdue.edu (Kevin Braunsdorf) Followup-To: sender Distribution: na Organization: Purdue UNIX Group Lines: 24 References: [Yes, I know that one of them assignes... that is not the point of this note.] I want an environment variable `ROFF' to be an nroff/troff/DITroff command (if set). I want the default to be `nroff -man' so I try: ${ROFF-'nroff -man'} $file to which the shell replys sh: nroff -man: not found clever me tries ${ROFF='nroff -man'} $file and it works! But *only* on 1/2 of the machines I try it on. What is the correct way to get what I want? (eval is ugly as far as I see.) I'll summarize, of course. TNX. -- "I think therefore I am, I thunk therefore I call-by-name!" kayessbee, Kevin Braunsdorf, ksb@j.cc.purdue.edu, pur-ee!ksb