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

Re: Portable shell scripts



On Mon, Nov 10, 2003 at 07:15:56AM +0800, csj wrote:
> Is there a way to write portable shell scripts.  In particular,
> I've problems with built-ins setenv (tcsh) and export (bash).
> How do I define variables in tcsh and have them usable in bash
> too?

I don't believe you can write anything useful in a way portable to both
Bourne-style shells and the C shell; they're incompatible. I suggest
ignoring the C shell for scripting and using /bin/sh.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: