"Shell like words"

shell
These builtin words are modelled after common shell commands,
so that the Portable Forth Environment can often
be put in the place of a normal OS shell.
Tektronix CTE %version: 5.18 % GNU LGPL
EXTENSIONS #ifdef PFE_HAVE_PID
* $PID ( -- pid )

calls system's getpid

shell ordinary primitive

EXTENSIONS $$

no special info, see general notes

shell loader code P4_xOLD

#endif #ifdef PFE_HAVE_UID
* $UID ( -- val )

calls system's getuid

shell ordinary primitive

* $EUID ( -- val )

calls system's geteuid

shell ordinary primitive

#endif #ifdef PFE_HAVE_GID
* $GID ( -- val )

calls system's getgid

shell ordinary primitive

#endif #ifdef PFE_HAVE_UMASK
* UMASK ( val -- ret )

calls system's umask

shell ordinary primitive

#endif
* $HOME ( -- str-ptr str-len )

calls system's getenv(HOME)

shell ordinary primitive

* $USER ( -- str-ptr str-len )

calls system's getenv(USER)

shell ordinary primitive

* $CWD ( -- str-ptr str-len )

calls system's getcwd

shell ordinary primitive

* PWD ( -- )

calls system's getcwd and prints it to the screen
 : PWD  $CWD TYPE ;

shell ordinary primitive

* mimics a unix'ish shell-command - PARSEs one filename/dirname
EXTENSIONS RM

no special info, see general notes

shell compiling primitive

EXTENSIONS TOUCH

no special info, see general notes

shell compiling primitive

* CHDIR ( bstring -- )

change the current directory.

(under VxWorks it is global! do not use in scripts!!)

shell ordinary primitive

EXTENSIONS CD

no special info, see general notes

shell loader code P4_xOLD

EXTENSIONS RMDIR

no special info, see general notes

shell compiling primitive

EXTENSIONS MKDIR

no special info, see general notes

shell compiling primitive

#ifdef PFE_HAVE_LINK
* mimics a unix'ish shell-command - PARSEs two filenames/dirnames
EXTENSIONS LN

no special info, see general notes

shell compiling primitive

#endif
PFE_HAVE_LINK
#ifndef NO_SYSTEM
* will invoke a shell-command with the command and a two filenames
EXTENSIONS MV

no special info, see general notes

shell compiling primitive

#endif #ifdef GOT_DIR
* mimics a unix'ish shell-command - PARSEs one filename/dirname
EXTENSIONS LL

no special info, see general notes

shell compiling primitive

EXTENSIONS LS

no special info, see general notes

shell compiling primitive

#endif
NO_SYSTEM
* mimics a unix'ish shell-command - PARSEs two filenames/dirname
EXTENSIONS CP

no special info, see general notes

shell compiling primitive