2.4.1.1. - System Functions
chdir()-
Changes spec's current working directory to
to the user's home directory as obtained from the user's
environment variable
HOME.
Returns
true or false according to whether the
command was successful or not.
The value of the built-in string variable
CWD is updated to the current working directory.
chdir(directory)-
As above, but changes to the directory
directory,
which must be a string constant or expression.
unix()-
Spawns an interactive
subshell using the
program obtained from the user's
environment variable
SHELL
(or
shell).
Uses
/bin/sh
if the
environment variable is not set.
Returns the integer exit status of the shell.
unix(command)-
As above, but uses
/bin/sh
to execute the one-line
command
command,
which must be a string constant or expression.
Returns the integer exit status of the command.
unix(command, str [, len ])-
As above, but the argument
str
is the name of a variable in which to place the string output
from the command in the first argument.
The maximum length of the string is 4096 bytes (including a null byte).
The optional third argument can be used to specify a larger
size.
time()-
Returns the current epoch in seconds.
The UNIX epoch
is the number of seconds from
January 1, 1970,
00:00:00 GMT.
The value returned includes a fractional part with the resolution
dependent on the host platform.
Millisecond resolution is standard, although on 80X86 systems
only hundredth of a second resolution is returned.
date()-
Returns a string containing the current
date as
Thu Jul 23 21:12:39 EDT 1992 .
date(seconds)-
As above, but the returned string
represents the epoch given by
seconds.
See
time() above.
|