Command Line Executables and Scripts

We have several kinds of executable commands; those that are built into the bash shell, executables that are binary program files, and scripts that are interpreted by another program, like bash or perl or python.

While Windows determines what a file is by its extension, Linux examines the first few bytes of the file itself. The file extension is less important than in Windows. Here is a tool to determine what a particular file actually is:

me@ubu:~$ file $d/defoma me@ubu:~$ file $d/du me@ubu:~$ file $d/nroff me@ubu:~$ file $d/pydoc2.4[/span

Of particular interest are those that are bash (or Bourne shell) scripts. If you place a series of bash command lines in a file, and make that file executable, you have made a shell script. See the menu item that says Shell Scripts.

Printed from (Command Line Executable Programs and Scripts -, Linux in Belize)