• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.



Page history last edited by PBworks 12 years, 9 months ago


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):

  • ${HOME}/.aliasrc (${HOME} defaults to '/' in kernel)
  • /etc/sashrc

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):

  • ${HOME}/.aliasrc (${HOME} defaults to '/usr/home' in /etc/sashrc)



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


    -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:

  • ${VARNAME} environment variable expansion
  • if/elif/else/fi conditional (script only)


if [ <condition> ]


some command

elif [ <condition> ]

some other command


a third command


  • while/do/done conditional loop (script only)


while [ <condition> ]


some command

some other command



Shell commands

alias      [name [command]]
-ar        [txp]v arFileName fileName ...
-cat       fileName ...
cd         [dirName]
-chgrp     gid fileName ...
-chmod     mode fileName ...
-chown     uid fileName ...
-cmp       fileName1 fileName2
-cp        srcName ... destName
-dd        if=name of=name [bs=n] [count=n] [skip=n] [seek=n]
-echo      [args] ...
-ed        [fileName]
exec       fileName [args]
-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
-rm        fileName ...
-rmdir     dirName ...
setenv     name value
sleep      seconds
source     fileName
.          fileName
-sum       fileName ...
-tar       [cxtv]f tarFileName fileName ...
test       EXPRESSION
[          EXPRESSION
-touch     fileName ...
umask      [mask]
-umount    fileName
unalias    name
-where     program



[John, 2008-03]

  • Re-wrote init portions
  • Added command line editing, command history in ${HOME}/.sash_history
  • Added SHELL parameters in ${VAR} format
  • Added "test"/"[" expression evaluation
  • Added "if/elif/else" and "while/break/continue" block commands
  • Might still need shell arithmetic (bigbox includes 'expr')
  • Added Zombie process reaper
  • Added pipeenv builtin pipeenv COUNTER expr ${COUNTER} + 1
  • Added LINES and COLUMNS terminal size auto-updating
  • Added -pivotroot built-in to sash. Tested working with new kernel.
  • Added "-" (stdin) stream to -grep, -cat

Comments (0)

You don't have permission to comment on this page.