Top 1,000 Features Creators Resources Extensions Blog Explorer CSV Download
GitHub icon

Bash

< >

Bash is an open source programming language created in 1989 by Brian Fox.

#18on PLDB 35Years Old 2mRepos
Download source code:
git clone https://git.savannah.gnu.org/git/bash.git

Try now: Riju ยท TIO

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...


Example from Riju:
echo "Hello, world!"
Example from hello-world:
#!/bin/sh echo "Hello World"
Example from Linguist:
#!/bin/sh echo "sh"
Example from Wikipedia:
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

Language features

Feature Supported Token Example
Conditionals โœ“
Functions โœ“
While Loops โœ“
File Imports โœ“
source ./bash.sh
Assignment โœ“ =
FOO="bar"
Print() Debugging โœ“ echo
echo "Hello World"
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

View source

- Build the next great programming language ยท About ยท Acknowledgements ยท Part of the World Wide Scroll