Bash Command Line Examples

This section provides some Bash shell command line examples with explanations.

Below are some Bash shell command line examples with explanations:

      Displays the values of all variables, global and local 

      Displays the values of all environment (global) variables.

echo $-
      Tests of shell mode. The shell is interactive, if it contains 
      an 'i' in the value.
alias ..='cd ..; pwd'
      Sets an alias command of ".." to change current directory to 
      the parent directory.
      Sets the prompt to be the dollar sign $

      Sets the current working directory to a local variable D.

export D
      Exports the local variable D to be a global variable, so that 
      any sub shells can use it.

echo $D
      Displays the values of variable D.

cat > myself
(Type in some words about yourself)
      Creates a file and lets you to enter text from the keyboard.

cat myself
      Displays the contents of "myself" on the screen.

sleep 200
      "Ctrl-C" cancels the execution of the sleep command.

sleep 200
      "Ctrl-Z" stops the execution of the sleep command and pushes 
      it to background.

sleep 200 &
      Runs the sleep command in the background.
      Lists all background jobs.
      Lists all previously executed command lines

Table of Contents

 About This Book

 1957 - FORTRAN Language Developed by IBM

 1970 - UNIX Operating System Developed by AT&T Bell Labs

 1971 - FTP Protocol Created by Abhay Bhushan

 1972 - C Language Developed by Dennis Ritchie

 1976 - vi Text Editor Developed by Bill Joy

 1977 - Apple II Designed by Steve Jobs and Steve Wozniak

 1977 - The Bourne Shell Developed by Stephen Bourne

 1978 - The C Shell Developed by Bill Joy

1978 - Bash (Bourne-Again Shell) Developed by Brian Fox

 What Is Bash (Bourne-Again Shell)?

Bash Command Line Examples

 Bash Shell Script File Examples

 1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer

 1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman

 1984 - Macintosh Developed by Apple Inc.

 1984 - X Window System Developed a MIT Team

 1991 - WWW (World Wide Web) Developed by Tim Berners-Lee

 1991 - Gopher Protocol Created by a University of Minnesota Team

 1995 - Java Language Developed by Sun Microsystems

 1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf

 2002 - .NET Framework Developed by Microsoft


 PDF Printing Version