GENERAL PROGRAMMING

Command-line Interfaces

Article by:
Date Published:
Last Modified:

Overview

A command-line interface is a way of interacting (sending instructions, receiving info) with programs on a computer.

NOTE

For a C++ command-line interpreter, that can run on both embedded and P.C. architectures, see clide-cpp on Github.

See C->Processing Command-Line Input for how to write C code for dealing with command-line arguments passed to main().

Related is the page C#->Redirecting The Command-line To A Text Block.

Command Description (Help) Syntax

  • Angled brackets for required parameters, e.g. cd.
  • Square brackets for optional parameters, e.g. ls [-a].
  • Ellipses for repeated items, e.g. cp [source2…] .
  • Vertical bars and curly braces when there is a choice of items (logical or), e.g. netstat {-t|-u}.

Authors

Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Tags

    comments powered by Disqus