😎
CS1.dev
  • Welcome to Computer Science 1
  • Unit 2
    • Activity 2.1
    • Activity 2.2
    • Activity 2.3
    • Activity 2.4
    • Activity 2.5
    • Activity 2.6
    • Activity 2.7
    • Activity 2.9
    • Activity 2.10
    • Project 2
    • Activity 2.8
    • Activity 2.11
    • Activity 2.12
    • Activity 2.13
    • Activity 2.14
    • Activity 2.15
    • Activity 2.16
    • Activity 2.17
    • Activity 2.18
    • Activity 2.19
    • Project 3
    • Activity 2.20
    • Activity 2.21
    • Activity 2.22
    • Activity 2.23
    • Activity 2.24
    • Project 4
    • Activity 2.25
    • Activity 2.26
    • Activity 2.27
    • Activity 2.28
    • Project 5
    • Activity 2.29
    • Activity 2.30
    • Activity 2.31
    • Activity 2.32
    • Activity 2.33
    • Activity 2.34
    • Activity 2.35
    • Activity 2.36
  • Unit 3
    • Activity 3.1
    • Activity 3.2
    • Activity 3.3
    • Activity 3.4
    • Activity 3.5
    • Activity 3.6
    • Activity 3.7
    • Activity 3.8
    • Activity 3.9
    • Activity 3.10
    • Activity 3.11
    • Project 6
    • Activity 3.12
  • Activity 3.13
  • Activity 3.14
  • Activity 3.15
  • Activity 3.16
  • Project 7
  • Activity 3.17
  • Activity 3.18
  • Activity 3.19
  • Project 8
  • Linux
    • bash
    • cat
    • cd
    • chmod
    • df
    • echo
    • find
    • grep
    • less
    • ls
    • mkdir
    • more
    • pwd
    • tar
    • touch
    • unzip
    • zip
Powered by GitBook
On this page
  1. Linux

bash

The Bash shell, short for "Bourne Again SHell," is a command-line interface (CLI) and scripting language used primarily on Unix and Unix-like operating systems, including Linux and macOS. It's an enhanced replacement for the original Bourne shell (/bin/sh), written by Steve Bourne for Unix. Bash was created by Brian Fox in 1989 and has since become one of the most widespread and popular command-line interpreters.

Here are the key aspects of the Bash shell:

  1. Command-Line Interface: Bash provides a text-based interface where users can type commands to perform operations like file manipulation, program execution, and system management. It displays a prompt, waiting for user input.

  2. Scripting Language: Bash is not just for interactive use; it also serves as a scripting language. Users can write Bash scripts, which are essentially programs that can automate tasks, manipulate files, and execute complex workflows.

  3. Features: Bash includes many features that enhance user productivity and scripting capabilities, including:

    • Command history: Keeps a record of previously entered commands.

    • Command completion: Auto-completes commands and filenames with the Tab key.

    • Command editing: Provides text editing capabilities while typing commands.

    • Job control: Manages multiple processes (jobs) running in the background or foreground.

    • Aliases: Allows creating shortcuts for long commands.

  4. Environment Variables: Bash uses environment variables, which are dynamic-named values that affect how running processes behave. For example, the PATH variable tells Bash where to look for executable files.

  5. Pipes and Redirection: Bash supports piping (|) and redirection (>, <, >>, etc.), allowing users to send the output of one command as input to another command or to a file.

  6. Programming Constructs: Bash includes programming constructs like loops (for, while), conditional statements (if, case), and functions, allowing the creation of complex scripts.

  7. Expansion and Globbing: Bash can expand variables, perform arithmetic operations, and match filenames using patterns (known as globbing).

  8. Portability and Compatibility: Being POSIX-compliant, Bash scripts can often be run on any Unix-like operating system with little to no modification.

PreviousProject 8Nextcat

Last updated 4 days ago