.. _Extended3Bash:
.. raw:: html
.. |--| unicode:: U+2013 .. en dash
.. |---| unicode:: U+2014 .. em dash, trimming surrounding whitespace
:trim:
.. This file is part of the OpenCSF eTextbook project. It was
.. auto-generated by scripts from the OpenDSA eTextbook project.
.. See https://OpenCSF.org for more details. OpenCSF is distributed
.. under a Creative Commons Attribution-NonCommercial 4.0 International
.. License (see http://creativecommons.org/licenses/by-nc/4.0/),
.. Copyright (c) 2019-2021 by Michael S. Kirkpatrick. OpenDSA is
.. distributed under an MIT open source license, Copyright (c) 2012-2021
.. by the OpenDSA Project Contributors.
.. avmetadata::
:author: Michael S. Kirkpatrick
:requires:
:satisfies: Extended Example Bash
:topic: Shell
Extended Example: Bash-lite: A Simple Command-line Shell
========================================================
This Extended Example creates a minimal shell similar to the bash shell used in Linux and macOS.
When this program runs, it will read a line of text at a time from the user. This line will be used
as a command line, running in a separate process. The user can enter ``quit`` or ``logout`` to exit.
.. codeinclude:: IPC/ExtEx-3.c
:linenos: true