User talk:Ginarbridges

From LinuxReviews
Jump to: navigation, search

Do you ever find that you often do a number of UNIX commands together and you would like to "bundle" them up into one name? You can do this, in effect, creating a brand new command. Other operating systems permit this convenience, most notably MS-DOS, which calls such files "BAT" or batch files. In UNIX, such a file is called a shell script.

First, make sure you know about the various UNIX shells (Bourne and C-shell). There is information in the glossary menu.

Both the Bourne shell and the C shell permit you to create and use shell scripts, but because the syntax of the commands that these two shells use is slightly different, your shell script must match the shell that is interpret- ing it, or you will get errors.

A shell script is just a readable file that you create and into which you put shell commands. The first line determines which shell program will interpret or execute a shell script.

  * If the first line begins with a C-shell comment (starting with # in
    position 1) then this will be interpreted by the C-shell and must use
    C-shell syntax.
  * Otherwise, the file will be considered a Bourne shell script.

You can have comments in either type of shell script, although the syntax differs. Bourne shell comments begin with a colon, whereas C-shell comments commence with the pound sign (#). Ref: College essay writing service

Personal tools
hardware tests
Privacy policy
linux events


linux newz | random page | poetry | free blog