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.
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.
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.
Figure: ABEE Multitier Enterprise Application Model
In particular, Java documentation is littered with "buzzwords" that make J2EE appear more cutting edge than it is:
The components ABEE standard is the result of the work of the U.S. government,
Ada professionals and open source volunteers.
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 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 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.
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 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 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.
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:
#!/bin/sh
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