-- os-like / shell-like commands for pfe
Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved.
description: 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.
EXTENSIONS
$PID
( -- pid )(
)
;
p4:"getpid";
calls system's getpid
EXTENSIONS
$$
( .. )(
)
;
as:"str-str";
obsolete forthword $$
is doing the same as $PID
This word should be replaced. It will be deleted in the near future. Instead use the (newer) synonym word given above.
EXTENSIONS
$UID
( -- val )(
)
;
p4:"getuid";
calls system's getuid
EXTENSIONS
$EUID
( -- val )(
)
;
p4:"geteuid";
calls system's geteuid
EXTENSIONS
$GID
( -- val )(
)
;
p4:"getgid";
calls system's getgid
EXTENSIONS
UMASK
( val -- ret )(
)
;
p4:"umask";
calls system's umask
EXTENSIONS
$HOME
( -- str-ptr str-len )(
)
;
p4:"home";
calls system's getenv(HOME)
EXTENSIONS
$USER
( -- str-ptr str-len )(
)
;
p4:"user";
calls system's getenv(USER)
EXTENSIONS
$CWD
( -- str-ptr str-len )(
)
;
p4:"cwd";
calls system's getcwd
EXTENSIONS
PWD
( -- )(
)
;
p4:"pwd";
calls system's getcwd and prints it to the screen
: PWD $CWD TYPE ;
EXTENSIONS
RM
( .. )(
)
;
as:"rm";
compiling primitive RM
an executable word (no special usage info)
or wrapper call around p4_remove
EXTENSIONS
TOUCH
( .. )(
)
;
as:"touch";
compiling primitive TOUCH
an executable word (no special usage info)
or wrapper call around p4_touch
EXTENSIONS
CHDIR
( bstring -- )(
)
;
p4:"chdir";
change the current directory. <br>
EXTENSIONS
CD
( .. )(
)
;
as:"cd";
obsolete forthword CD
is doing the same as CHDIR
This word should be replaced. It will be deleted in the near future. Instead use the (newer) synonym word given above.
EXTENSIONS
RMDIR
( .. )(
)
;
as:"rmdir";
compiling primitive RMDIR
an executable word (no special usage info)
or wrapper call around p4_rmdir
EXTENSIONS
MKDIR
( .. )(
)
;
as:"mkdir";
compiling primitive MKDIR
an executable word (no special usage info)
or wrapper call around p4_md
EXTENSIONS
LN
( .. )(
)
;
as:"ln";
compiling primitive LN
an executable word (no special usage info)
or wrapper call around p4_link
EXTENSIONS
MV
( .. )(
)
;
as:"mv";
compiling primitive MV
an executable word (no special usage info)
or wrapper call around p4_mv
EXTENSIONS
LL
( .. )(
)
;
as:"ll";
compiling primitive LL
an executable word (no special usage info)
or wrapper call around p4_ll
EXTENSIONS
LS
( .. )(
)
;
as:"ls";
compiling primitive LS
an executable word (no special usage info)
or wrapper call around p4_ls
EXTENSIONS
CP
( .. )(
)
;
as:"cp";
compiling primitive CP
an executable word (no special usage info)
or wrapper call around p4_cp