{"id":1718,"date":"2022-12-01T07:15:23","date_gmt":"2022-12-01T07:15:23","guid":{"rendered":"https:\/\/blog.amt.in\/?p=1718"},"modified":"2022-12-01T07:15:23","modified_gmt":"2022-12-01T07:15:23","slug":"insights-on-command-line-interface","status":"publish","type":"post","link":"https:\/\/blog.amt.in\/index.php\/2022\/12\/01\/insights-on-command-line-interface\/","title":{"rendered":"Insights on Command Line Interface"},"content":{"rendered":"<p>A\u00c2\u00a0command-line interface\u00c2\u00a0(CLI) processes commands to a computer program in the form of lines of text. The program which handles the interface is called a\u00c2\u00a0command-line interpreter\u00c2\u00a0or\u00c2\u00a0command-line processor. Operating systems implement a command-line interface in a\u00c2\u00a0shell\u00c2\u00a0for interactive access to operating system functions or services. Such access was primarily provided to users by\u00c2\u00a0computer terminals\u00c2\u00a0starting in the mid-1960s, and continued to be used throughout the 1970s and 1980s on\u00c2\u00a0VAX\/VMS,\u00c2\u00a0Unix\u00c2\u00a0systems and personal computer systems including\u00c2\u00a0 DOS,\u00c2\u00a0 CP\/M\u00c2\u00a0 and\u00c2\u00a0 Apple DOS.<\/p>\n<p>Today, users rely upon\u00c2\u00a0graphical user interfaces\u00c2\u00a0and menu-driven interactions. However some programming and maintenance tasks may not have a graphical user interface and may still use a command line.<\/p>\n<p>Alternatives to the command line interface include\u00c2\u00a0text user interface\u00c2\u00a0menus\u00c2\u00a0(for example,\u00c2\u00a0IBM AIX SMIT),\u00c2\u00a0keyboard shortcuts, and various\u00c2\u00a0desktop metaphors\u00c2\u00a0centered on the\u00c2\u00a0pointer\u00c2\u00a0(usually controlled with a\u00c2\u00a0mouse). Examples of this include the Microsoft Windows,\u00c2\u00a0DosShell, and Mouse Systems PowerPanel. Command line interfaces are often implemented in terminal devices that are also capable of screen-oriented text user interfaces that use cursor addressing to place symbols on a display screen.<\/p>\n<p>Programs with command-line interfaces are generally easier to automate via\u00c2\u00a0scripting.<\/p>\n<p>Many software systems implement command line interfaces for control and operation. This includes programming environments and utility programs.<\/p>\n<p>Compared with a graphical user interface, a command line interface requires fewer system resources to implement. Since options to commands are given in a few characters in each command line, an experienced user may often find the options easier to access. Automation of repetitive tasks is simplified by line editing and history mechanisms for storing frequently used sequences; this may extend to a\u00c2\u00a0scripting language\u00c2\u00a0that can take parameters and variable options. A command-line history can be kept, allowing review or repetition of commands.<\/p>\n<p>A command-line system may require paper or online manuals for the user&#8217;s reference, although often a &#8220;help&#8221; option provides a concise review of the options of a command. The command-line environment may not provide the graphical enhancements such as different\u00c2\u00a0<a title=\"Computer font\" href=\"https:\/\/en.wikipedia.org\/wiki\/Computer_font\">f<\/a>onts\u00c2\u00a0or extended\u00c2\u00a0edit windows\u00c2\u00a0found in a GUI. It may be difficult for a new user to become familiar with all the commands and options available, compared with the\u00c2\u00a0icons\u00c2\u00a0and\u00c2\u00a0drop-down menus\u00c2\u00a0of a graphical user interface, without repeated reference to manuals.<\/p>\n<h3><span id=\"Operating_system_command-line_interfaces\" class=\"mw-headline\">Operating system command-line interfaces:<\/span><\/h3>\n<p>Operating system (OS) command-line interfaces are usually distinct programs supplied with the operating system. A program that implements such a text interface is often called a command-line interpreter, command processor or\u00c2\u00a0<a title=\"Shell (computing)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Shell_(computing)\">shell<\/a>.<\/p>\n<p>Examples of command-line interpreters include\u00c2\u00a0DEC&#8217;s\u00c2\u00a0DIGITAL Command Language\u00c2\u00a0(DCL) in\u00c2\u00a0OpenVMS\u00c2\u00a0and\u00c2\u00a0RSX-11, the various\u00c2\u00a0Unix shells\u00c2\u00a0(sh,\u00c2\u00a0ksh,\u00c2\u00a0csh,\u00c2\u00a0tcsh,\u00c2\u00a0zsh,\u00c2\u00a0bash, etc.),\u00c2\u00a0CP\/M&#8217;s\u00c2\u00a0CCP,\u00c2\u00a0DOS&#8217;s\u00c2\u00a0COMMAND.COM, as well as the\u00c2\u00a0OS\/2\u00c2\u00a0and the Windows\u00c2\u00a0CMD.EXE\u00c2\u00a0programs, the latter groups being based heavily on DEC&#8217;s RSX-11 and\u00c2\u00a0RSTS\u00c2\u00a0CLIs. Under most operating systems, it is possible to replace the default shell program with alternatives; examples include\u00c2\u00a04DOS\u00c2\u00a0for DOS,\u00c2\u00a04OS2\u00c2\u00a0for OS\/2, and\u00c2\u00a04NT \/ Take Command\u00c2\u00a0for Windows.<\/p>\n<p>Although the term &#8216;shell&#8217; is often used to describe a command-line interpreter, strictly speaking a &#8216;shell&#8217; can be any program that constitutes the user-interface, including fully graphically oriented ones. For example, the default Windows GUI is a shell program named\u00c2\u00a0EXPLORER.EXE, as defined in the SHELL=EXPLORER.EXE line in the WIN.INI configuration file. These programs are shells, but not CLIs.<\/p>\n<h3><span id=\"Application_command-line_interfaces\" class=\"mw-headline\">Application command-line interfaces:<\/span><\/h3>\n<p>Application programs (as opposed to operating systems) may also have command line interfaces.<\/p>\n<p>An application program may support none, any, or all of these three major types of command line interface mechanisms:<\/p>\n<ul>\n<li><i>Parameters<\/i>: Most operating systems support a means to pass additional information to a program when it is launched. When a program is launched from an OS command line shell, additional text provided along with the program name is passed to the launched program.<\/li>\n<li><i>Interactive command line sessions<\/i>: After launch, a program may provide an operator with an independent means to enter commands in the form of text.<\/li>\n<li><i>Inter-process communication<\/i>: Most operating systems support means of\u00c2\u00a0inter-process communication\u00c2\u00a0(for example,\u00c2\u00a0standard streams\u00c2\u00a0or\u00c2\u00a0named pipes). Command lines from client processes may be redirected to a CLI program by one of these methods.<\/li>\n<\/ul>\n<p>Some applications support only a CLI, presenting a CLI prompt to the user and acting upon command lines as they are entered. Other programs support both a CLI and a GUI. In some cases, a GUI is simply a\u00c2\u00a0wrapper\u00c2\u00a0around a separate CLI\u00c2\u00a0executable file. In other cases, a program may provide a CLI as an optional alternative to its GUI. CLIs and GUIs often support different functionality. For example, all features of\u00c2\u00a0MATLAB, a\u00c2\u00a0numerical analysis\u00c2\u00a0computer program, are available via the CLI, whereas the MATLAB GUI exposes only a subset of features.<\/p>\n<p>The early Sierra games, such as the first three\u00c2\u00a0King&#8217;s Quest\u00c2\u00a0games (1984\u00e2\u20ac\u201c1986), used commands from an internal command line to move the character around in the graphic window.<\/p>\n<p>A CLI is used whenever a large vocabulary of commands or queries, coupled with a wide (or arbitrary) range of options, can be entered more rapidly as text than with a pure GUI. This is typically the case with\u00c2\u00a0operating system command shells. CLIs are also used by systems with insufficient resources to support a graphical user interface. Some computer language systems (such as\u00c2\u00a0Python,\u00c2\u00a0Forth,\u00c2\u00a0LISP,\u00c2\u00a0Rexx, and many dialects of\u00c2\u00a0BASIC) provide an interactive command-line mode to allow for rapid evaluation of code.<\/p>\n<p>CLIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. CLIs are also popular among people with visual disabilities, since the commands and responses can be displayed using\u00c2\u00a0refreshable Braille displays.<\/p>\n<p>Most command-line interpreters support\u00c2\u00a0scripting, to various extents. (They are, after all, interpreters of an\u00c2\u00a0interpreted programming language, albeit in many cases the language is unique to the particular command-line interpreter.) They will interpret scripts (variously termed\u00c2\u00a0shell scripts\u00c2\u00a0or\u00c2\u00a0batch files) written in the\u00c2\u00a0language\u00c2\u00a0that they interpret. Some command-line interpreters also incorporate the interpreter engines of other languages, such as\u00c2\u00a0REXX, in addition to their own, allowing the executing of scripts, in those languages, directly within the command-line interpreter itself.<\/p>\n<p>Conversely,\u00c2\u00a0scripting programming languages, in particular those with an\u00c2\u00a0eval\u00c2\u00a0function\u00c2\u00a0(such as REXX,\u00c2\u00a0Perl,\u00c2\u00a0Python,\u00c2\u00a0Ruby\u00c2\u00a0or\u00c2\u00a0Jython), can be used to implement command-line interpreters and filters. For a few\u00c2\u00a0operating systems, most notably\u00c2\u00a0DOS, such a command interpreter provides a more flexible command-line interface than the one supplied. In other cases, such a command interpreter can present a highly customised user interface employing the user interface and input\/output facilities of the language.<\/p>\n<p>The above is a brief about\u00c2\u00a0Command-line interface. Watch this space fore more updates on the latest trends in Technology.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A\u00c2\u00a0command-line interface\u00c2\u00a0(CLI) processes commands to<\/p>\n","protected":false},"author":1,"featured_media":1721,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[608,539,7],"tags":[610,540,18],"class_list":["post-1718","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line-interface","category-computer-programming","category-techtrends","tag-command-line-interface","tag-computer-programming","tag-technology"],"_links":{"self":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/comments?post=1718"}],"version-history":[{"count":2,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1718\/revisions"}],"predecessor-version":[{"id":1720,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1718\/revisions\/1720"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/media\/1721"}],"wp:attachment":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/media?parent=1718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/categories?post=1718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/tags?post=1718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}