Shell Script to Generate Ascii Table

Only available on StudyMode
  • Topic: ASCII, Unicode, Scripting language
  • Pages : 6 (760 words )
  • Download(s) : 545
  • Published : November 15, 2012
Open Document
Text Preview
Project Report
CSE257T : PROGRAMMING IN LINUX ENVIRONMENT

(TOPIC : Writing Shell Script which generates ASCII table)

Submitted to:Submitted by :
Mr. Sami AnandRahul
Reg. no. : 11005906
Section: K1R12
Roll no: 21

Acknowledgement

I take this opportunity to present my votes of thanks to all those guidepost who really acted as lightening pillars to enlighten our way throughout this project that has led to successful and satisfactory completion of this study. I am highly thankful to Mr. Sami Anand for her active support, valuable time and advice, whole-hearted guidance, sincere cooperation and pains-taking involvement during the study and in completing the assignment of preparing the said project within the time stipulated. Lastly, I am thankful to all those, particularly the various friends , who have been instrumental in creating proper, healthy and conductive environment and including new and fresh innovative ideas for us during the project, their help, it would have been extremely difficult for us to prepare the project in a time bound framework.

Table of Content

1. Abstract

2. Introduction

3. System requirements

4. Advantages

5. Coding

6. Testing

7. My module

8. Future purpose

9. Bibliography

Abstract :-
I’ve been assigned project “Write a shell script which generates ASCII table” for subject CSE257T (PROGRAMMING IN LINUX ENVIRONMENT).
In my project I’ve made a shell script using linux which will generate ASCII table and will show the values for particular alphabet assigned to ASCII value. We will do the testing part for the coding of the program. Introduction:-

Linux :-Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution in which we do shell scripting for the programing. ASCII table : -The American Standard Code for Information Interchange is a character-encoding scheme originally based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many additional characters. My project is the combination of these two aspect mentions above. Using the shell script I’ll generate the ASCII table in a text file. System Requirements :-

* Linux(Unix) based Operating system- fedora, ubuntu
* C, sh Shell script
* C compiler

Coding :-
The coding for shell scripting for generating ASCII table is : -------------------------------------------------
#!/bin/bash
-------------------------------------------------
# ascii.sh
-------------------------------------------------
# Script by rahul and priyanka
-------------------------------------------------
# Used with permission CHMOD
-------------------------------------------------

-------------------------------------------------
exec >ASCII.txt
-------------------------------------------------

-------------------------------------------------
MAXNUM=256
-------------------------------------------------
COLUMNS=5
-------------------------------------------------
OCT=8
-------------------------------------------------
OCTSQU=64
-------------------------------------------------
LITTLESPACE=-3
-------------------------------------------------
BIGSPACE=-5
-------------------------------------------------

-------------------------------------------------
i=1 # Decimal counter
-------------------------------------------------
o=1 # Octal counter
-------------------------------------------------

-------------------------------------------------
while [ "$i" -lt "$MAXNUM" ]; do
-------------------------------------------------
paddi=" $i"
-------------------------------------------------
echo -n "${paddi: $BIGSPACE} " # Column spacing....
tracking img