GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.fullstackpython.com — Bash shell Bash shellThe Bourne-Again SHell (source code), almost always referred to simply as "Bash", interprets and executes input entered from a source such as the user or a program. Bash is an implementation of the shell concept and is often used during Python software development as part of a programmer's development environment. Bash is an implementation of the shells concept. Learn more in the development environments chapter or view the table of contents for all topics.
How do Python developers use Bash?If you are programming in the terminal on macOS or Linux, or using the Windows Subsystem for Linux on Windows 10, you can easily gain access to Bash if it is not already your default shell. You can show what shell you are currently using by echoing the
$ echo "$SHELL"
Which will then print the shell you are currently using. For example, on macOS I am using Bash by default so the echo command prints: /bin/bash How much you use Bash or any shell will likely depend on your
development environment, especially
if you are using an editor like Vim instead of an
IDE like PyCharm, because it is often easier to do
certain tasks in the shell. For example, most developers I know who
use PyCharm will search for some instance of source code right in
their IDE, whereas I use a combination of Vim and tmux
so I frequently flip between panes to use commands like There is no right way to perform a task like source code searching, it's really just what works for your brain as a developer that will guide how often you interact with the Bash shell. Getting started with BashWorking with a shell, Bash or otherwise, is intimidating the first time
you try to get started. You are staring at the When you are completely new to using Bash, it is a good idea to at least scan, if not take some additional time for in-depth reading of the documentation for commands that every developer uses. The following commands are used so frequently in Bash that an experienced developer probably does not even think about them anymore, they become just a natural part of your workflow:
If you know how to use the above commands then you will at least be able to move around the file system, create, move and update files and know what is on your storage device(s). The following commands are somewhat more advanced but also frequently used by developers:
The above lists are not even close to exhaustive for what commands you need to know when working with Bash. Read some of the following introductory tutorials to gain a better understanding of working with this shell:
Bash scriptingBash is used not only as an interactive prompt but also for scripting, which makes it possible to execute one or more Bash commands stored within a file. These scripts can be short, with only a single command, or very complicated with control-flow logic, for loops, and almost anything you want to automate or compute because Bash is a Turing-complete programming language. Complex Bash scripts sometimes get a negative reputation because they can be difficult to read and understand if you are not the original author (or you are reading your own script after a significant period of time has elapsed). There are many ways to accomplish the same tasks with Bash so the files are often confusing to read unless the author of a script included clear documentation. This readability problem is typically less of an issue with Python scripts because spacing is enforced and the standard library encapsulates common tasks. It's a good idea to think about how you want to structure your Bash scripts as they grow larger. The following resources provide insight into what you should consider while coding Bash scripts.
Additional Bash resourcesThe following resources cover more advanced Bash use cases and what pitfalls to try to avoid as you work with the shell or write scripts.
What do you want to learn about Python development?
1. Introduction
2. Development Environments
Text Editors & IDEs
Vim
Emacs
Sublime Text
PyCharm
Jupyter Notebook
Shells
Bash shell
Zsh
PowerShell
Terminal Multiplexers
tmux
Screen
Environment configuration
Application Dependencies
Virtualenvs
Localhost tunnels
Source Control
Git
Mercurial
3. Data
4. Web Development
5. Deployment
6. DevOps
Changelog
What Full Stack Means
About the Author
Future Directions
Page Statuses
...or view the full table of contents.
Full Stack Python
Full Stack Python
is an open book that explains concepts in plain language and provides
helpful resources for those topics.
Updates via Twitter & Facebook. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |