Top || Section Contents || Permuted Index
SavaJe OS 1.1.0

lsh(shell)


NAME

lsh — command line shell

SYNOPSIS

com.savaJe.os.shell.lsh [-win]

DESCRIPTION

lsh is the SavaJe command-line shell. It executes commands read from standard input.

History

The shell contains a simple history mechanism, summarized below.

/ repeat the last shell command
/d dump a numbered list of shell command history
/num repeat the command associate with num

Option

-win create shell in a separate window

When you run commands from the shell prompt, they can be followed by an optional action.

Actions

; run the command in the foreground (the current thread). This is the default action.
& run the command in the background (in a separate thread)
> file redirect the standard output of the command to file

Shell scripts

You can execute shell commands in a file (scripts) by using the source(shell) command.

Startup script

You can have lsh execute a startup file by setting the property savaJe.lsh.startup in the file /ramfs/users/username /savaJe/user.props, which gets read when the user username logs in. For example, the following line in user.props would cause the script startup.lsh to be run when an lsh starts:

savaJe.lsh.startup=startup.lsh

EXAMPLES

The following example executes two commands in succession: first, print a long listing of the files in the current directory to the file ls.txt (in the current thread). When that is done print the contents of ls.txt to standard output.

lsh% ls -l > ls.txt; cat ls.txt

The following example runs the application found in BigApp.jar on the http server someserver in a separate thread so that the shell prompt returns immediately.

lsh% run http://someserver/BigApp.jar &

The next example starts a new shell in a separate window.

lsh% com.savaJe.os.shell.lsh -win &

SEE ALSO

source(shell)
run_java(doc)


Jan. 10, 2002
Copyright © 2002 , SavaJe Technologies, Inc. All rights reserved.
Corrections, suggestions to: docs@savaje.com