12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

history N — As above, but only prints the N most recent commands. If N is negative,the commands are printed in reverse order.lscmd — This command lists all the built-in commands, functions and keywords.lscmd pattern ...— As above, except only names matching pattern are listed.memstat — Shows the current memory usage.savstate — Writes the current state to the state file.The state file contains the variables, macro-file bitmap, output file names andcommand history unique to each user, terminal and diffractometer. The statefile preserves the current situation when the user leaves the program, so thatthe same situation can be restored when the user later returns to the program.<strong>spec</strong> can be invoked with a § user flag and a § tty flag. These flags instructthe program to initialize the current user’s state from the files associated withthe other user and/or terminal. Subsequent savstate commands access theuser ’snatural state file.The savstate command does not save the state files until the entire parsedmini-program in which the command occurs has been run.Note, as of release 4.05.01, a new show_state utility is included in the <strong>spec</strong> distribution.This utility can display the contents of <strong>spec</strong> state files. Typeshow_state − to see the utility’susage message.sock_io(host:port, cmd [, arg ]) — Connects and communicates with sockets createdby other processes on the local or a remote host. The host can be <strong>spec</strong>ifiedby a symbolic name or by an IP address. The string cmd is one of the following:"?" — Lists the command options available."show" — Lists the current open sockets and their status."connect" — Opens the socket to the <strong>spec</strong>ified host and port. Returns true forsuccess and false for failure."listen" — Sets up a socket for listening, allowing another instance of <strong>spec</strong> orsome other program to make a connection."close" — Closes the socket associated with the <strong>spec</strong>ified host and port."send" — Sends the string arg to the <strong>spec</strong>ified socket, opening it if not alreadyconnected."read" — Reads from the <strong>spec</strong>ified socket, opening it if not already connected.Currently, the message to be read can be no longer than 1,024 bytes.With no argument, reads until a newline or until the timeout expires.An optional string argument can <strong>spec</strong>ify an end-of-string (EOS) delimiter,inwhich case the socket will be read until characters matching the80 REFERENCE MANUAL INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!