Re: missing 'export' command...?

From: Lars Eighner (eighner_at_io.com)
Date: 05/29/05


Date: Sun, 29 May 2005 13:59:47 -0500

In our last episode,
<O6ome.41917$G8.23813@text.news.blueyonder.co.uk>,
the lovely and talented Paul
broadcast on comp.unix.bsd.freebsd.misc:

> Hi,

> I've just installed the latest version of FreeBSD(5.4) from the iso CD
> images, and the 'export' command seems to be missing....?! I'm no UNIX
> expert, but isn't 'export' a standard command?

> If I enter something like : 'export SOMETHING=anything' , I just get:
> 'export: Command not found.' If I type 'whereis export', I get this:
> 'export: /usr/share/man/man1/export.1.gz' - just the man page..(?). So
> there is the command itself?

export is a shell command. It doesn't exist outside the sh (or
sh-like) shell. I forget what the default user shell is these
days, but sh is the default for root and if you want to run
bash, you have to install it as a port.

export will, of course, work for anyone in an sh script, since
sh is part of the base system. You just can't use from the
command line if you are running a different shell.

> Any suggestions would be appreciated

-- 
Lars Eighner                   SAVE BEASTIE!      
eighner@io.com                                         http://larseighner.com/
 "Stale dependency": When pkgdb -F reports this, it means the dependency is
                missing, not that the dependency is obsolete.


Relevant Pages

  • Bash-4.0 available for FTP
    ... Unlike previous bash distributions, this tar file includes the formatted ... The shell has been changed to be more ... rigorous about parsing commands inside command substitutions, ... Changes have been made to the Readline library being released at ...
    (gnu.announce)
  • Why newbies dont RTFM...
    ... Even though I've used Linux before, I've never had to do any ... BASH BUILTIN COMMANDS ... last command exited within ... unless the shell is not exeâ ...
    (comp.os.linux.misc)
  • Re: Great SWT Program
    ... None of the nasty things that you have said or implied about me are at ... treat the file as input (manually invoking the command interpreter ... script, copy the line into that within the editor, exit, and invoke ... the shell script. ...
    (comp.lang.java.programmer)
  • Re: ksh silently ignores function if mistakenly not autoloaded
    ... Here's the order of execution. ... This really takes place prior to command ... Shell scripts, with all their power, have one major drawback - they ... In the Korn Shell, there are two separate syntaxes for defining ...
    (comp.unix.shell)
  • Re: Shell function - accessing an Access secure db (.MDW file)
    ... > Hi - Does anyone know the correct syntax for the shell function. ... You can use the Shell command. ... To execute internal DOS command (Dir, Copy, ... Private Declare Function OpenProcess _ ...
    (microsoft.public.vb.general.discussion)