Introducing
The Slant team built an AI & it’s awesome
Find the best product instantly
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now
4.7 star rating
0
Operating System
What are the best command line operating systems?
2
Options
Considered
5
User
Recs.
Jan 28, 2021
Last
Updated
Related Questions
Activity
Have feedback or ideas?
Join our community
on Discord
Ad
2
Options
Considered
Best command line operating systems
Price
Last Updated
--
Arch Linux
-
Nov 1, 2020
--
MS-DOS
-
Jan 28, 2021
See Full List
--
Arch Linux
My Rec
ommendation
for
Arch Linux
My Recommendation for
Arch Linux
All
13
Pros
9
Cons
4
Top
Pro
•••
Default shell on most systems
Bash is the default shell on virtually every UNIX system. Making it very portable across different systems and once you get used to it, you can use it everywhere.
See More
Top
Con
•••
One of the most dangerous languages around
What it is mostly used for are file system operations. Guess what it is bad at? Operating on files. It automatically splits and carries out filename expansion on every single string resulting from variable expansion and command substitution unless quoted, by default on whitespace, whilst spaces are very common in filenames. Before that, it even does pathname expansion, so woe to anywone who does not want to actually operate on files, but has a globbing metacharacter stored anywhere in a variable. This means what you store in a variable is not going to be what will ACTUALLY be accessed. If an empty variable is unquoted, it disappears completely due to word splitting, sometimes leading to applications signalling a missing parameter at a wrong position. If quoted however, said variables cannot be iterated over in a loop, no matter what character one uses for word splitting. If you use any globbing pattern with a command, be sure to use -- after the option arguments or if none are present, before starting the pattern with a mandatory ./ Otherwise, another Bash script run gone wrong or a hacker can create files named like an option ("-f", for instance) and your program will happily accept it as such, if it results from globbing. For interactive use, it is convenient. For programming, it is a no-go.
See More
Top
Pro
•••
Plenty of examples and tutorials
Since this is very mature shell there is a lot of great examples and other resources describing how to do almost everything.
See More
Top
Con
•••
Non-intuitive shell expansion in for loops
If there are no .sh files, this will print mask itself: for filename in *.sh; do echo $filename done
See More
Top
Pro
•••
Rich scripting capabilities
BASH scripting is a rich and robust language.
See More
Top
Con
•••
No out-of-the-box command autocompletion
To have command autocompletion in bash you need to install third-party plug-ins.
See More
Top
Pro
•••
POSIX compatible
See More
Top
Con
•••
Extremely complicated and inconsistent rules
In Bash, exceptions are the rule, not even all being described by the main page. There are a grand total of 5 different ways of quoting, sometimes even when one does not want to, for instance in command substitutions. These are all based around preserving the literal meaning of every character, with an exception list. There is even an exception list to the exception list in 4 of the 5, regarding how the backslash behaves! The behavior of the backslash is also one of the quoting rules, so naturally, it also has an exception in how it works when it stands before a newline as compared to other characters. Bash has several layers of interpretations, all to be kept in mind: The ~ expands to the home of the current user. So if you store it in a variable, can you use it that way? Nope: tilde expansion comes before variable expansion. Aha, so that's how it works! Then, since applying quotation happens after redirections are set up, it must mean that redirecting within quotes works, right? Nope: there is an exception! If a redirection symbol is not quoted, quotation around the symbol is observed, but is not removed. So, since variable expansion also comes after setting up redirections, and no exceptions are described here in the man page, getting the name of a file from a variable and using it as a target should not work, right? No: redirection does not actually take place when the symbols are being read, the symbols are merely removed and are noted for later, right before when the actual command runs. Apart from 5 types of quotation, there are basically 2 quoting phases, 2 word splitting phases (with only one being controllable), and a tokenization phase on top of that. If you have a command, it could be an alias, a special built in, a non-special built in, a symbolic link to a file, a regular file, a function, with different rules regarding how they can be overridden, if redirection happens before or after arguments have been passed (what does "time my_command 2>&1 >log_file" do?), etc. This list is admittedly long, but it doesn't even scratch the surface of the bloat, complexity and inconsistencies of Bash.
See More
Top
Pro
•••
Variables and aliases are listed the way they are built
alias and set will list aliases and variables in a format that can be run directly with no modifications. Even if the values contain \n. This is handy if you want to modify a value.
See More
Top
Pro
•••
Recursive globbing
ls **/*.log for example is supported by Bash if you set shopt -s globstar.
See More
Top
Pro
•••
Emacs-like keyboard control
By default, BASH uses shortcuts and concepts very similar to Emacs, so learning one often results in familiarity with the other.
See More
Top
Pro
•••
Rich built-in features
By default, there are many built-in features. They make really complex and reliable programs possible. In comparison to dash, for example, you can do the same tasks in less time and fewer lines of code.
See More
Top
Pro
•••
Rich scripting capabilities on a single line
Want to run something 5 times? Write a throw-away loop: for i in 1 2 3 4 5; do date; done If you need it 100 times? Not a problem: for i in {1..100}; do date; done or: for ((i=0; i<100; ++i)); do date; done How about emailing yourself when remote server is back online? Sure thing: while ! ping -c1 example.com &>/dev/null; do date; sleep 5; done && mailx -s 'server is back!' me@myself.com
See More
Hide
See All
Recommend
2
--
MS-DOS
My Rec
ommendation
for
MS-DOS
My Recommendation for
MS-DOS
All
2
Pros
1
Cons
1
Top
Pro
•••
Best OS to run QBASIC on
While QBASIC works on newer operating systems, such as Windows 95 and Windows 98, it was designed for and runs best on MS-DOS.
See More
Top
Con
•••
Literally horrible
MS-DOS is terrible -- just read about real mode. It was an almost decent solution for its time, but not anymore.
See More
Hide
Recommend
2
1
Don't see your favorite option? Add it.
Built By the Slant team
Find the best product instantly.
4.7 star rating
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now - it's free
One sec!
Are you sure that you want to abandon your hard work?
Delete Work
Continue working
{}
undefined
url next
price drop