petervansark / effective-shell

Text, samples and references for my 'Effective Shell' series.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

effective-shell

Text, samples and references for my 'Effective Shell' series.

Chapters

Note: Chapters can be read in any order. But all of the chapters in Part 3 assume you have read the first two chapters of Part 3, which teach you how to manage your own customisations.

Another potential structure would be:

  • Section 1: Independent Tips
  • Section 2: Pipelines
  • Section 3: Customisation (bashrc)

Quick References

Navigating the Command Line

Coming Soon!

If you have arrived on this link, it will be for a link to a section which has not been completed yet. Other chapters I am working on, or planning are:

  • Shebangs: How to use, when to use env, how shebangs work with multiple shells (e.g. if I source a bash shebang in a zsh, what will happen?)
  • Aliases. When to use (and more importantly, when not to use).
  • Dotfile management (profile, private, etc)
  • Sourcing (bashrc, profile, interactive, noninteractive, etc)
  • Understanding Pipelines
  • Understand logging (syslog, logger etc)
  • Terminal Multiplexing: screen and tmux
  • ANSI C Escaping (see https://www.dwmkerr.com/quick-tip-sending-newlines-with-curl/#comment-4375113010)
  • Moving Files - scp, aws s3, xcopy etc
  • Know Your Arrows! Pipe stdin <, >>, >, 2&>1 etc
  • Understanding Commands (command -v to see functions, aliases, builtins etc)
  • Customising the command prompt
  • Basic Shell Scripting
  • Internal Variables (https://www.tldp.org/LDP/abs/html/internalvariables.html#PROCCID)
  • Heredocs
  • screen and tmux
  • ANSI C Escaping (see https://www.dwmkerr.com/quick-tip-sending-newlines-with-curl/#comment-4375113010)
  • See if I can get an interview with shell creators?
  • The history of shells, a shell family tree
  • The rising popularity of commandline interfaces (Borland, VC++ vs Code, Vim etc)
  • Globing (e.g. cat file{1,2,3})
  • Quick aliases (e.g. D for ISO8601 date)
  • Watching (e.g. watch k get pods)
  • Supercharging autocomplete

Improvements

  • Add tree to the Chapter 'Moving Around'.
  • Getting Help: help
  • man test is an excellent way to quickly check common tests (existence of a file etc)
  • For the 'Getting Help' page, include whatis and whereis.

Sharing

When sharing, the following hashtags have proven to be useful:

#shell #linux #bash #devops #hacking #coding #programming

Research

(Note: once this research starts getting used, must create a proper citations/references section)

Great source of shell tricks and tips:

The Pitch

This is not a book about Shell Programming. There are many excellent Shell Programming books (see below). This is about general terminal and shell skills which will make you effective with many day to day tasks. Some shell programming is covered, but this is primary a book about how to work more effectively with command line interfaces and shells in general.

Possible titles:

Darkscreen: 30 ways to use shells and terminals to be more effective developer or operator.

Shell Programming Books

This is list of useful books which are about Shell Programming, Terminal usage, Vim usage etc.

The Future

Useful notes for what might be changing and evolving in this space.

A Terminal for the Graphical Age - Great article on an ASCII terminal with modern features. Very interesting project.

Research

(Note: once this research starts getting used, must create a proper citations/references section)

Great source of shell tricks and tips:

Reading List

Beginners

Shell Scripting by Jason Cannon - For absolute beginners this book might be useful. However, it is very short and really only covers a few topics. I suggest that for a beginners book, something with a bit more content may be better.

Great books!

Shell Scripting: How to Automate Command Line Tasks Using Bash Scripting and Shell Programming - Jason Cannon How Linux Works, 2nd Edition: What Every Superuser Should Know - Brian Ward Wicked Cool Shell Scripts, 2nd Edition: 101 Scripts for Linux, OS X, and UNIX Systems - Dave Taylor The Linux Command Line: A Complete Introduction - William E. Shotts Jr.

Advanced

About

Text, samples and references for my 'Effective Shell' series.

License:MIT License


Languages

Language:CSS 57.4%Language:HTML 32.6%Language:C 6.5%Language:JavaScript 3.5%