Sash


Sash

Stand-alone shell (sash) is a Unix shell used for booting up the MG-35/45, and as the default command interpreter.

 

Version: 3.7-mg

Status: Done

 



 

Boot (init)

Sash first runs as the boot manager (init), checking for (and executing if found):

After it finishes running sashrc, it displays a command prompt on the console (serial port in developer kernel).

 

Subshell (sh, sash)

Whenever sash starts as a subshell, it checks for (and executes if found):

 

Usage


sash [ { -c command | -f scriptfile } ] [ -p prompt ] [-q] [-a]

Options:

    -c command
        Execute command, and exit.  If command contains spaces or
        other shell special characters, you should enclose it in
        "quotes" and escape any special characters.

    -f scriptfile
        Load commands from scriptfile and execute them.

    -p prompt
        Set the interactive shell prompt string.

    -q  Be quiet.
    
    -a  Alias all built-in commands.
   

 

Shell language

The sash shell has been extended to include support for:

 

if [ <condition> ]

then

some command

elif [ <condition> ]

some other command

else

a third command

fi

 

while [ <condition> ]

do

some command

some other command

done

 

Shell commands

alias      [name [command]]
aliasall   
-ar        [txp]v arFileName fileName ...
-cat       fileName ...
cd         [dirName]
-chgrp     gid fileName ...
-chmod     mode fileName ...
-chown     uid fileName ...
-clear     
-cmp       fileName1 fileName2
-cp        srcName ... destName
-dd        if=name of=name [bs=n] [count=n] [skip=n] [seek=n]
-dmesg     
-echo      [args] ...
-ed        [fileName]
exec       fileName [args]
exit       
-file      fileName ...
-find      dirName [-xdev] [-type chars] [-name pattern] [-size minSize]
-grep      [-in] word fileName ...
help       [word]
-kill      [-sig] pid ...
-ln        [-s] srcName ... destName
-ls        [-lidFC] fileName ...
-mkdir     dirName ...
-mknod     fileName type major minor
-more      fileName ...
-mount     [-t type] [-r] [-s] [-e] [-m] devName dirName
-mv        srcName ... destName
-pipeenv   VARNAME program [ | program ] ...
-pivotroot newroot oldroot
-printenv  [name]
prompt     string
-ps        
-pwd       
quit       
-rm        fileName ...
-rmdir     dirName ...
setenv     name value
sleep      seconds
source     fileName
.          fileName
-sum       fileName ...
-sync      
-tar       [cxtv]f tarFileName fileName ...
test       EXPRESSION
[          EXPRESSION
-touch     fileName ...
umask      [mask]
-umount    fileName
unalias    name
-where     program

 

History

[John, 2008-03]