Bash is an open source programming language created in 1989 by Brian Fox.
#19on PLDB | 35Years Old | 2mRepos |
git clone https://git.savannah.gnu.org/git/bash.git
Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been distributed widely as the default login shell for most Linux distributions and Apple's macOS (formerly OS X). A version is also available for Windows 10. Read more on Wikipedia...
echo "Hello, world!"
#!/bin/sh
echo "Hello World"
#!/bin/sh
echo "sh"
cd "$SOMEWHERE" && ./do_something || echo "An error occurred" >&2
if then do else elif while until for in esac fi fin fil done exit set unset export function
Feature | Supported | Example | Token |
---|---|---|---|
Standard Library | ✓ | echo "Hello, World!" | |
Conditionals | ✓ | ||
Functions | ✓ | ||
While Loops | ✓ | ||
File Imports | ✓ | source ./bash.sh | |
Assignment | ✓ | FOO="bar" | = |
Print() Debugging | ✓ | echo "Hello World" | echo |
Pipes | ✓ | echo "Hello world" > output.txt | |
Here Document | ✓ |
cat <
| |
Integers | ✓ | PLDB=80766866 | |
Strings | ✓ | "Hello world" | " |
Line Comments | ✓ | # A comment | # |
Comments | ✓ | # A comment | |
Variable Substitution Syntax | ✓ | STR="Hello World!" echo $STR | |
Sets | X | ||
MultiLine Comments | X | ||
Semantic Indentation | X | ||
Units of Measure | X |