The language of shells

Unix Insider |  Operating Systems

  • ; -- Separates multiple commands on a command line


  • & -- Causes the preceding command to execute asynchronously (as its own separate process so that the next one does not wait for it to complete)


  • () -- Enclose commands that are to be launched in a separate shell


  • | -- Pipes the output of the command to the left of the pipe to the input of the command on the right of the pipe


  • > -- Redirects output to a file or device


  • >> -- Redirects output to a file or device and appends to it instead of overwriting it


  • < -- Redirects input from a file or device


  • newline -- Ends a command or set of commands


  • space -- Separates command words


  • tab -- Separates command words

Some metacharacters can be used in combinations, such as ||, &&, and >>. With these metacharacters you can define a command-line word, which is a sequence of characters separated by one or more nonquoted metacharacters.

To access the online manuals, use the man command, followed by the name of the command you need help with. For instance, to see the manual for the ls command, enter:

man ls
Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Ask a Question
randomness