Skip to content

Project used to facilitate learning bash. Level-up your bashing weapons skills!

License

Notifications You must be signed in to change notification settings

Cedrusco/cedrus-training-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cedrus

Cedrus Training: Bash

Project used to facilitate learning bash. Level-up your bashing weapons skills!

Bashing Weapons Source: Gfycat

Layout

  • docker: Dockerfiles for the test playground.
  • scripts: Demonstration scripts for the commands presented. Scripts are snippets, not entirely runnable scripts!
  • docker-compose.yml: Configuration for the playground.

Getting Started

This project uses Docker containers to create a test environment to play around in.

  1. Ensure you have Docker and Docker Compose installed on your system.
  2. Run docker-compose build from the top of the project to build the playground.
  3. Run docker-compose up -d && docker-compose run ubuntu bash to enter the playground.
  4. To stop the running instances, run docker-compose down

Outline

What is Bash

  • Bourne Shell (sh)
  • POSIX IEEE standard
  • Bourne Again SHell (bash)

Why Bash

  • Helpful in day-to-day tasks
  • Important for understanding your OS
  • Application development for containers (LXD, Docker)
  • Server administration

Getting Started

  • Mac / Linux: Good to Go!
  • Windows: Git Bash or WSL (Windows Subsystem Linux)
  • Docker: docker pull bash

Level 0: Basic & Builtins

  • cat
  • cd
  • echo (bonus: scripts/progress-bar.sh)
  • exit
  • export / unset
  • find / locate
  • help
  • history
  • less / more / tail
  • ls
  • man
  • mkdir
  • mv
  • ping
  • pwd
  • read
  • rm
  • rmdir
  • touch
  • type
  • whereis
  • which

Level 1: Operators & Variables

  • Variables
  • Parameters
  • Arithmetic
  • Logical
  • IO

Level 2: Control Flow & Functions

  • while, for, if/else
  • Functions

Level 3: Configuration & Advanced Commands

  • alias
  • .bashrc / .profile
    • Create aliases for common commands, set up environment variable values
    • Use .bashrc for commands, aliases, and environment vars specific to bash
    • Use .profile for non-bash environment vars, is POSIX compatible, and executed upon login
  • diff
  • grep
  • rsync
  • sed
  • scp
  • ssh
  • xargs

The Arena!

What commands or bash knowledge do you find helpful?

A few from Session 1

Helpful Links

Author(s)

  • Matt Johnson (src-system42)

Copyright

MIT (c) 2019 Cedrus, LLC

About

Project used to facilitate learning bash. Level-up your bashing weapons skills!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published