Bush Guide: Part 1 - Introduction and Advocacy

<-- Contents  Part 2 -->
This section contains a high level overview of the BUSH shell. It includes a list of the newest features and comparisions to similar tools.


Bush is easy to learn.
Bush is easy to use.
Bush is a tool to get the job done.

There are many shells, interpreters and languages available.  Virtually without exception, they are incompatible with one another.    What's the point of learning a tool that, no matter how sophisticated it is, leaves your source code stuck with that particular tool.  You want to do scripting, so you use Python or Scheme.  You want to do reporting, so you use Perl.  You want to write a script, so you use Bash.  You want to write an applet, so you use Java.  To be a programmer these days, you need to be fluent in a dozen different languages.  You would be making more money if you got a job at the United Nations.

The Business Shell is different.  It's based on a language called AdaScript, a subset of one of the most powerful languages available for Linux today.  Ada 95 is a GCC supported language so any project you write in Bush is immediately portable to any machine that GCC runs on.  In other words, virtually everything.  And it means that Bush scripts can be compiled using GCC and everyone knows that GCC is superior to most commercial compilers.  If that's not enough, using the JGNAT open source compiler, you can even compile your Bush scripts into actual Java bytecode.  There is another tool, A#, that will compile scripts into .NET byte code  Things don't get much more platform-independent than that.

But Bush does more than just create scripts, executable programs and Java applets.  It's a powerful computer language on its own able to do complex math, manipulate files, generate reports and able to do network programming.  Bush will let strings grow as big as you need without worry of a running out of buffer space.  And a number of built-in packages will let you do everything from compute trig functions to connecting to a web server.

But best of all, Bush is easy.  Perl claims to be easy.  Easily like riding a bicycle backwards in the middle of a thunderstorm.  Bush is easy to read, easy to understand.  You know exactly what a script does without having to have a reference book beside you at all times

Bush doesn't run your programs outright.  First it examines them, compresses them, and converts them into intermediate code.  (That's "byte code", to you Java developers.) Bush optimizes the program for the best possible performance. It also takes the time to verify your program will run before attempting to execute the first line.

And if you make to typing mistake, Bush will let you know before running your program.  There's no need to worry that your typo will be a valid command like it would be in most other languages.  Bush works for you, not against you.

One tool for all solutions.

And, yes, Bush is also makes a pretty good shell.

So you basically have two choices. Keep working for the U.N., or give Bush a try and make your life a little easier. Now if only the Gnome guys would adopt Bush for their .NET strategy.


This release focused on improving and stabilizing the shell features.

What's Not Complete

There are many open source scripting languages and shells available.  They are often created to solve particular kinds of problems.  The following sections summarize the major differences between BUSH and these other common tools.

Ada-BUSH Enterprise Endevour (ABEE) vs. J2EE

Java 2 Enterprise Edition (J2EE) is a proprietary Sun standard for writing web-based Java applications that run on multiple computers.  Although there is nothing unique about J2EE, it serves as a marketing tool by demonstrating Java's versatility.  Java "components" (small applications) can be distributed across an information system using secure connections to negotiate with one another.

Linux, of course, has traditionally used a similar concept to break apart large applications into small utilities that can be executed across multiple machines using technologies like SSH (Secure Shell) and NFS (Network File System).  Under Linux, it is possible to create a free, open source solution based on proven techniques that give similar advantages to Sun's proprietary J2EE.

The Ada-BUSH Enterprise Endevour (ABEE) combines GCC Ada, BUSH and other Linux tools to create a comparable environment to J2EE.

[Ada-Bush Enterprise Model]

Figure: ABEE Multitier Enterprise Application Model

In particular, Java documentation is littered with "buzzwords" that make J2EE appear more cutting edge than it is:

J2EE is not your only solution for writing multitiered enterprise applications.  The ABEE strategy offers the same advantages as solutions offered by Sun. Reusable components, client interaction using HTML/XML/HTTP, scalability and high availability over a network are all possible with an Ada-Bush strategy. Ada-Bush allows applications to be written once and run everywhere, supports CORBA technology to interface with existing enterprise resources, and creates a single standard that can be use effectively throughout an enterprise. Plus you get to use a truly scalable language system that cuts down training expenses and allows applications to be "scaled up" with minimum effort. And did we mention that it's free and open source?

The components ABEE standard is the result of the work of the U.S. government, Ada professionals and open source volunteers.


BASH (the "Bourne Again SHell") is an extended version of the traditional UNIX Bourne shell (sh).   BASH supports most of the Bourne shell's original syntax, but also has features of the C and Korn shells such as integer and array variables.  The Bourne shell syntax is hard to debug and is not compatible with other computer languages.  BASH can act as an interactive shell or can run scripts.

BUSH is a shell that  has the fundamental syntax of the Bourne shell.  However, BUSH uses a different language for advanced features making BUSH easier to read and debug.  BUSH scripts can be compiled into Java or .NET byte code or into an executable program.  BUSH's reliability, scalability and speed make it ideally suited for professional scripting projects.  BUSH can act as an interactive shell and can run scripts.

BUSH vs. Python

Python (named after "Monty Python") is an interpreted language designed for small projects needing rapid development. It is not a shell or a scripting language. It contains many features, like lamda functions, complex numbers and objects, not suitable for shell scripts. The shortcuts provided by Python cause reliability problems in large, complex projects. Because of its unique design, projects developed in Python cannot easily be upgraded to a compiled language.

BUSH is a shell and language designed for high reliability business and scientific applications. BUSH scripts are slower to develop than Python programs but are easier to maintain over the lifetime of a project. The shortcuts BUSH provides are carefully chosen so as not to undercut reliability. BUSH features do not fall victim to the "feature bloat" syndrome that weakens the reliability of a language. BUSH scripts can be easily upgraded to a compiled language.


PERL ("Practical Extraction and Report Language") is, as its name suggests, a scripting language for data analysis and designing reports. It combines the features of a scripting language, the sed command, and the awk command.

PERL is known for its cryptic syntax. Although short PERL scripts can process a lot of data easily, PERL scripts are difficult to read even by those that wrote them. The need for extensive comments in scripts often outweights the benefits of its concise language.

PERL is not a shell and is not designed to run programs or to handle process control. However, it contains many features beyond report generation, including interprocess communication and database access. Because of its pattern matching features, cryptic syntax and shell-like quoting rules, PERL makes large projects error-prone and difficult to maintain.

PERL is often described as portable. With GNU tools and the Linux operating system, portable languages like PERL are no longer necessary. Even when PERL is chosen for portability, it is not based on any standard: features can change and break between even minor releases of PERL making PERL scripts difficult to port and upgrade.

BUSH is a Linux shell and shell language designed for high reliability business and scientific applications. Although it's not a report generation language, it can generate reports using formatted output and pattern matching like PERL does.

BUSH scripts are not as suitable for quick-and-dirty projects but BUSH scripts are easier to maintain over the lifetime of a project. Because of its emphasis on a typo-resistent syntax, BUSH is easier to maintain, especially when used large projects. BUSH scripts can also be compiled into executable programs, Java applets or .Net programs.

BUSH is heavily tested and based on an international standard making it more portable than PERL.


PL/SQL is the Oracle stored procedure language.  Both BUSH and PL/SQL are based on Ada making BUSH very easy to learn for PL/SQL users.  Many PL/SQL commands and statements will work in BUSH.  However, BUSH is not a stored procedure language and it does not understand SQL database commands.

BUSH vs. Ada 95

Ada 95 (named after the world's first programmer) is a multithreaded, exception handling, object-oriented programming language used for large, high-integrity projects. It is known for abundant features, high performance, strong checking and readability.

The BUSH shell is not an Ada interpreter. BUSH uses AdaScript, a subset of the Ada 95 language with additional features specifically for interactive shell sessions. Because of its Ada 95 background, BUSH scripts are easy to create, maintain, debug and can be compiled into fast, executable programs using an Ada 95 compiler.

If you are looking for full Ada compilers or interpreters, they are available on the Internet.

BUSH vs. Java

Java is an interpreted programming language with threads, exception handling and object-oriented features. It can be compiled into "byte code" and applets can be created for web pages.  Java is known for it's awkward syntax, poor performance and debugging problems because of its C heritage.  Java is not a shell.

BUSH scripts can also be compiled into Java or .NET byte code (using the JGNAT compiler) and run the same way as Java applets/applications, including web page applets.  BUSH scripts are easy to create, maintain, debug and can be compiled into fast, executable programs using an Ada 95 compiler.

BUSH vs. Ruby

Ruby is a scripting language with threads, exception handling and objects.  Ruby is completely object oriented.  Ruby has a very compressed syntax that uses the "Principle of Least Surprise"--that is, Ruby attempts to "second guess" the programmer.  In some cases, removing a single space, or capitalizing a single letter, can cause a Ruby script to radically change its behaviour.  Ruby is not a shell.

BUSH is a shell and language designed for high reliability business and scientific applications. BUSH scripts are slower to develop than Ruby programs but are easier to maintain over the lifetime of a project. Changing capitalization and white space does not change the how a script is run. BUSH features do not fall victim to the "feature bloat" syndrome that weakens the reliability of a language. BUSH scripts can be easily upgraded to a compiled language.


QBASIC or QuickBASIC is a text-screen or console version of the BASIC language with a built-in IDE.  It features interactive debugging and drop-down menus.  BUSH, when combined with PegaSoft's TIA IDE, provides a text-screen language with drop-down menus and interactive debugging.

Frequently Asked Questions

1. Why is there no colour for the Linux/UNIX ls command?  How do I fix that?

The ls command doesn't use colour unless you use the --color option.  The BASH shell uses an alias for 'ls' which automatically includes the --color option.  The alias is usually created in /etc/profile by your operating system vendor.

BUSH's equivalent to aliases, command variables, do not allow command options.  To enable colour in BUSH, create a short script such as this BASH/ksh shell script:

ls --color $*

Make sure your script is has the "execute" permissions set.

Create an alias to this script in BUSH:

ls : constant command := "your-script-path";

To set up the alias automatically each time you log in, put the command variable in you /etc/bush_profile file.

2. Does BUSH have associative arrays like PERL?

BUSH does not have associative arrays per se.  However, you can create the equivalent of associative arrays usiong the "field" string functions: strings.field, strings.replace. BUSH also has regular single-dimensional arrays.

For large amounts of data, it is more efficient to store tables as files and use your operating system commands (e.g. in Linux/UNIX, grep, etc.) instead of using associative arrays.

3. Does BUSH....
Have a GPL licence? YES
Have source code available? YES
Can it be compiled? YES
Can it create Java byte code? YES
Run as an interactive shell? YES
Run as a login shell? YES
Run scripts? YES
Offer easy scalability to a more powerful language? YES
Have test suite included? YES
Run on Linux or UNIX? YES
Use its own interal byte code? YES
Have scoped variables and blocks? YES
Check for undeclared variables? YES
Have strong type checking? YES
Have powerful pattern matching like PERL? YES
Have command line shortcuts like Python? YES
Have built-in string and numeric functions? YES
Support Bourne shell syntax? Often
Have arrays? YES
Have enumerated types? A boolean type? YES
Have floating-point numbers? YES
Have unlimited length strings? YES
Have modules/units/packages? When a script is upgraded to Ada 95
Have objects? When a script is upgraded to Ada 95
Have multithreading? When a script is upgraded to Ada 95
Have TCP/IP sockets? YES
Do formatted output for writing reports? YES
Have user-defined types? YES
Support typeless variables? YES
Job control?  Signal handling? Partially, incomplete.
Have I/O redirection? YES
Have secure command aliases? YES
Automatically declare variables at the command prompt? YES, with a warning.
Have process substitution? No

End of Document