Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ exit(1CSH) — UTek W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

@(1csh)

alias(1csh)

bg(1csh)

break(1csh)

cd(1csh)

chdir(1csh)

continue(1csh)

csh(1csh)

dirs(1csh)

echo(1csh)

eval(1csh)

exec(1csh)

exit(1sh)

fg(1csh)

glob(1csh)

goto(1csh)

hashstat(1csh)

history(1csh)

jobs(1csh)

kill(1csh)

limit(1csh)

logout(1csh)

EXIT(1CSH)

nice(1csh)

nohup(1csh)

notify(1csh)

onintr(1csh)

popd(1csh)

pushd(1csh)

rehash(1csh)

repeat(1csh)

set(1csh)

setenv(1csh)

sh(1sh)

shift(1csh)

source(1csh)

stop(1csh)

suspend(1csh)

time(1csh)

trap(1sh)

umask(1csh)

unhash(1csh)

unalias(1csh)

unlimit(1csh)

unset(1csh)

unsetenv(1csh)

wait(1csh)

which(1csh)

ERROR(3c)

exit(3c)



EXIT(1CSH)              COMMAND REFERENCE              EXIT(1CSH)



NAME
     exit - exit the current shell (csh built-in)

SYNOPSIS
     exit [ expr ]

DESCRIPTION
     With no expr argument, exit causes the shell to exit with
     the status of the last command executed.  With an expr
     argument, the exit status is the value of the expression.

     Executing exit from a login shell causes logout(1csh) to be
     executed.  This means that the .logout file can be set up to
     interpret exit codes as shown below.

EXAMPLES
     The following shell script exits with a status equal to the
     number of arguments given to it.



          #!/bin/csh -f
          exit $#argv


     This is an example of a .logout file which uses the exit
     status to determine what to do before logging out.  If the
     status is 10, the screen is cleared.  Otherwise, the screen
     is cleared, the date is printed, and the contents of the
     file $HOME/.TODO are printed.



          if ($status == 10) then
               clear
          else
               clear
               date
               cat $HOME/.TODO
          endif

RETURN VALUE
     By default, the return value is the value of the last
     command executed.  If an expression is given, its value is
     returned.

SEE ALSO
     @(1csh), alias(1csh), bg(1csh), break(1csh), cd(1csh),
     chdir(1csh), continue(1csh), csh(1csh), dirs(1csh),
     echo(1csh), eval(1csh), exec(1csh), exit(1sh), fg(1csh),
     glob(1csh), goto(1csh), hashstat(1csh), history(1csh),
     jobs(1csh), kill(1csh), limit(1csh), logout(1csh),



Printed 10/17/86                                                1





EXIT(1CSH)              COMMAND REFERENCE              EXIT(1CSH)



     nice(1csh), nohup(1csh), notify(1csh), onintr(1csh),
     popd(1csh), pushd(1csh), rehash(1csh), repeat(1csh),
     set(1csh), setenv(1csh), sh(1sh), shift(1csh), source(1csh),
     stop(1csh), suspend(1csh), time(1csh), trap(1sh),
     umask(1csh), unhash(1csh), unalias(1csh), unlimit(1csh),
     unset(1csh), unsetenv(1csh), wait(1csh), which(1csh),
     ERROR(3c), exit(3c).
















































Printed 10/17/86                                                2





































































%%index%%
na:72,112;
sy:184,109;
de:293,523;
ex:816,661;
rv:1477,218;
se:1695,710;2549,911;
%%index%%000000000115

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026