Learn Basic Language

Basic is a very powerful language as a tool for the novice programmer. Basic allows for a wide range of applications, and it has many versions. However, as long as the emphasis is on the techniques of programming and problem solving, the specific syntax is easy to follow.
Significant Language Features
Basic is a multi-platform language because many basic compilers use the same types of routines. Basic allows:
  • Loops
  • Input from the keyboard
  • Menu Driven Applications
  • System Commands - These are words that make the system perform a specific task immediately.
  • Structured Programming

Main Menu For Learning Unix

Redirection in Unix

Most processes initiated by UNIX commands write to the standard output (that is, they write to the terminal screen), and many take their input from the standard input (that is, they read it from the keyboard). There is also the standard error, where processes write their error messages, by default, to the terminal screen.
We have already seen one use of the cat command to write the contents of a file to the screen.
Now type cat without specifying a file to read
 % cat
Then type a few words on the keyboard and press the [Return] key.

Unix Variables

Variables are a way of passing information from the shell to programs when you run them. Programs look "in the environment" for particular variables and if they are found will use the values stored. Some are set by the system, others by you, yet others by the shell, or any program that loads another program.
Standard UNIX variables are split into two categories, environment variables and shell variables. In broad terms, shell variables apply only to the current instance of the shell and are used to set short-term working conditions; environment variables have a farther reaching significance, and those set at login are valid for the duration of the session.
By convention, environment variables have UPPER CASE and shell variables have lower case names.

Unix Wild Cards Wildcards

The * wildcard The character * is called a wildcard, and will match against none or more character(s) in a file (or directory) name. For example, in your unixstuff directory, type
% ls list*
This will list all files in the current directory starting with list....

Try typing
% ls *list
This will list all files in the current directory ending with ....list

Unix Files

Copying Files
cp (copy)
cp file1 file2 is the command which makes a copy of file1 in the current working directory and calls it file2
Use the cp command to copy it to your unixstuff directory. First, cd to your unixstuff directory.
% cd ~/unixstuff
Then at the UNIX prompt, type,
% cp /vol/examples/tutorial/science.txt .
Note: Don't forget the dot . at the end. Remember, in UNIX, the dot means the current directory.
The above command means copy the file science.txt to the current directory, keeping the name the same.

Unix Directories

Listing files and directories 
ls (list)
When you first login, your current working directory is your home directory. Your home directory has the same name as your user-name, for example, ee91ab, and it is where your personal files and subdirectories are saved.
To find out what is in your home directory, type
% ls


What is UNIX?

UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops.
UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. However, knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session.

Summary of Unix Commands

There are MANY commands available for you in a UNIX shell account. A list of them follows (in no particular order).

ls ................. show directory, in alphabetical order
logout ............. logs off system
mkdir .............. make a directory
rmdir .............. remove directory (rm -r to delete folders with files)
rm ................. remove files
cd ................. change current directory
man (command) ...... shows help on a specific command