www.ScienceOfAtomics.com/linux
BASH
The Bourne Again SHell

•  HOME  •  THEORY  •  PRACTICE  •    •  LOGIN  •  FORUM  •  CONTACT  • 

The 7-bit ASCII Code is a permanent part of every PC's ROM BIOS. It defines 128 characters in a 7-bit code, and is formally listed as eight columns each of sixteen characters. The first two columns are the Control Characters that, along with Character 0x7F (DEL) form the Non-printing Characters. The six columns of Printing Characters are conveniently subdivided into Numerics, Upper Case, and Lower Case. Pressing the Control (Ctrl) key with an alphanumeric key moves the output code into the first two columns of Control Characters. The ASCII Code was published by the X 3.4 Committee of the American National Standards Institute in 1968, and is known by different names in different countries. It is recognized internationally as ISO-646.

Files containing only character codes from the ASCII table are known as flat ASCII files to distinguish them from files containing the Extended ASCII Characters (see below) and from Binary Files (also below).

All system files intended to be human-readable and human-editable are flat ASCII files.

Flat ASCII files should not be edited with a word-processor. A commandline text editor (such as mcedit) or graphical programmer's editor (such as nedit) should be used instead.

ANSI X3.4
American Standard Code For Information Interchange
Row\Column01234567
0NULDLESPC 0  &  P  `  p 
1SOHDC1!1AQaq
2STXDC2"2BRbr
3ETXDC3#3CScs
4EOTDC4$4DTdt
5ENQNAK%5EUeu
6ACKSYN&6FVfv
7BELETB'7GWgw
8BSCAN(8HXhx
9HTEM)9IYiy
ALFSUB*:JZjz
BVTESC+;K[k{
CFFFS,<L\l|
DCRGS-=M]m}
ESORS.>N^n~
FSIUS/?O_oDEL

THE ASCII CONTROL CODES

The ASCII Control Codes define a basic transmission control protocol and the essential control functions for printers and general storage media.

ASCII CONTROL CODES
NULNullBSBackspaceDLEData Link EscapeCANCancel
SOHStart of HeadingHTHorizontal TabDC1Device Control 1EMEnd of Medium
STXStart of TextLFLine FeedDC2Device Control 2SUBSubstitute
ETXEnd of TextVTVertical TabDC3Device Control 3ESCEscape
EOTEnd Of TransmissionFFForm FeedDC4Device Control 4FSFile Separator
ENQEnquiryCRCarriage ReturnNAKNegative AcknowledgeGSGroup Separator
ACKAcknowledgeSOShift OutSYNSynchronous IdleRSRecord Separator
BELBellSIShift InETBEnd Transmission BlockUSUnit Separator
SPCSpaceDELDelete

EXTENDED ASCII CODES

Over the years there have been many proposed extensions to the ASCII character set to fill the remaining 128 cells of an 8-bit (28 = 256) matrix. In recent years, with the move towards internationalization and the inclusion of non-English alphabets and non-Western scripts, The International Standards Organization has issued several standardized character sets. Of these, the most important for English use is the ISO 8859 standard. It includes several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). Especially important is ISO 8859-1, the "Latin Alphabet No. 1" which has become widely implemented as the de facto ASCII replacement.

ISO 8859-1 supports the following languages: Afrikaans, Basque, Catalan, Danish, Dutch, English, Faeroese, Finnish, French, Galician, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Scottish, Spanish, and Swedish.

Note that the ISO 8859-1 characters are also the first 256 characters of ISO 10646 or Unicode, a 16-bit (216 = 65,536) character set which includes the characters from all languages including Chinese.

Use  man ascii  and  man iso_8859-1  for more information.

CONFIGURATION FILES

The User's shell is the foundation of a personal configuration. Here are suggested contents for the two files used to configure bash. Both are in the User's Home Directory.


.bashrc

# .bashrc
# Written by Carl Adams 040307

# Execute the system-wide configuration script
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# Create single letter command aliases
alias c='eject -t; mount /dev/cdrom'
alias f='mount /dev/fd0'
alias g='mc -b'
alias n='clear'
alias o='umount /dev/cdrom; eject -r'
alias r='umount /dev/fd0'
alias z='mc'

# Create modified command aliases
alias cp='cp -i'
alias ed='mcedit'
alias ll='ls -1'
alias l.='ls -a'
alias lo='ls -1'
alias mv='mv -i'
alias rm='rm -i'

# Configure the command prompt
PS1="\[\033[0;36m\[[\W>\\$\[\033[0m\] "
export PS1


.bash_profile

# .bash_profile
# Written by Carl Adams 040307

# Execute the Runtime Configuration script
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# Set the User Name
USERNAME="root"

# Set the Shell search path
PATH=$PATH:$HOME/bin:/ace/bin

# Identify the Bash Runtime Configuration script
BASH_ENV=$HOME/.bashrc

# Identify the System text editor
EDITOR=mcedit

# Export the System Environment strings
export USERNAME PATH BASH_ENV EDITOR

# Start the X-Windows Graphical Environment
startx