OS X export X=bla equivalent ?

Discussion in 'Apple' started by lothar.behrens, Feb 10, 2005.

  1. Hi,

    I have these Linux shell script and like to ask for a osx replacement:


    export MODULELIB=lbModule.so
    export LBXMLFUNCTOR=getlbDOMConfigInstance
    export LBMODULEFUNCTOR=getlb_ModuleInstance
    export DEVROOT=~/develop
    export LD_LIBRARY_PATH=~/lib:
    export OSTYPE=linux

    Thanks for your help.

    lothar.behrens, Feb 10, 2005
    1. Advertisements

  2. Those commands should work if you use /bin/bash instead of /bin/sh (on
    Linux /bin/sh is just a link to /bin/bash). But the traditional Bourne
    shell syntax is:

    export MODULELIB
    Barry Margolin, Feb 11, 2005
    1. Advertisements

  3. On Mac OS X, /bin/sh and /bin/bash are the same thing. Different files,
    apparently, but identical.
    Tom Harrington, Feb 11, 2005
  4. Oh, you're right. I checked the inodes, I didn't notice that they were
    the same size.

    They're both bash, but bash checks what name it was invoked as; where
    there are incompatibilities between bash and traditional Bourne shell
    behavior, it switches to Bourne behavior when invoked as sh.

    However, I just checked and it understands

    export <var>=<val>

    in either mode, since this is an upward compatible extension of Bourne
    Barry Margolin, Feb 12, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.