0% found this document useful (0 votes)
4 views20 pages

Shell Script for Online Banking System

Uploaded by

meherkhambchetan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views20 pages

Shell Script for Online Banking System

Uploaded by

meherkhambchetan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

A

PROJECT REPORT
ON
Shell-Script For Online Banking/ATM System
[OSY]

SUBMITTED BY
Mst. Shinde Yashvardhan Balasaheb
[2100340268]

Under the guidance of


Mrs. MohanaPriya

DEPARTMENT OF COMPUTER TECHNOLOGY


Sanjivani Rural Education Society’s
SANJIVANI K. B. P. POLYTECHNIC
KOPERGAON – 423603, DIST: AHMEDNAGAR
2023-2024
Sanjivani Rural Education Society’s
SANJIVANI K. B. P. POLYTECHNIC
DEPARTMENT OF COMPUTER TECHNOLOGY

CERTIFICATE
This is to certify that the Project report entitled
Shell-Script For Online Banking/ATM System
[OSY]

Submitted By
Mst. Shinde Yashvardhan Balasaheb
[2100340268]

Under our supervision and guidance for partial fulfillment of the requirement for
Diploma in Computer Technology affiliated to
Maharashtra State Board of Technical Education, Mumbai
For academic year
2023 – 2024

Mrs. MohanaPriya Mr. G.N. Jorvekar


(Project guide) (HOD)
INDEX

Shell-Script For Online Banking/ATM System

Sr.
Table of Contents Page No.
No.

1 Project Proposal 4

2 Resource required 5

3 Introduction 6

4 Actual Procedure 7

5 Output 13

6 Skill developed 17

7 conclusion 18

8 Referances 18
Micro-Project Proposal
Shell-Script for online Banking/ATM System

1.0 Aim/Benefits of the Micro-Project:


1. To develop Programs using Shell-Script methodology in Linux Environment..
2. To understand various concepts of if-else decidion making statements, case and
function in Linux Command Line OS.
[Link] develop an application using varied Linux commands.

2.0 Course Outcomes Addressed:


1. Install operating system and configure it.
[✔]
2. Use operating system tools to perform various functions.
[✔]
3. Execute process commands for performing process management operations.
[✔]
4. Apply scheduling algorithms to calculate turnaround time and average waiting time.
[ ]
3.0 Proposed Methodology:
In order to make a best micro-project, we decided to divide our tasks and proposed a short
methodology for our project. It is as follows:

1. To have a brain-storming session for the topic with group members, select one of the
topics and get it alloted from the respective teacher.
2. To prepare a proposed plan about the Micro-Project and inform about it to the
respective teacher.
3. To manage the required resources like computer, printer, required softwares, etc. for
project.
4. To discuss about the aim, outcomes, applications, outputs, etc. of the project in detail.
5. To design algorithm and flowchart for the given alloted topic.
6. To start working for the code by carrying out the activites as guided in the flowchart.
7. Fixing of the bugs in the code by the team and producing the correct output.
8. To demonstrate the results and explain about the functioning of the project in the
class.
9. To prepare and submit the Full-Proof project report before the deadline to the
respective subject teacher.
5.0 Resources Required:

Sr. No. Name of Resource/material Specifications Remarks

1. A Hardware Computer System Intel Pentium Processor -------------

2. Operating System Kali Linux(64-bit) -------------

3. Reference Websites [Link] -------------

1.0 Rationale:
In this Project, we have developed an Online Banking/ATM application using shell-script in a
Linux based Operating System Environment. An Operating System is basically a system
program that controls the execution of programs and acts as an interface between applications
and the computer hardware. Linux is a family of open-source Unix-like operating systems based
on the Linux kernel. It is one of the fastest, smoothest and oldest operating system used till date
.

Kali Linux is a Debian-derived Linux distribution designed for digital forensics and
penetration testing; that we used for the development of our application. Throgh this
application, we have demonstrated the use of varied linux commands & concept of
function. The Application is divided into 8 modules and thus we have a program with 8
functions each of them inter-related to the other. Different modules of our online banking
system are to open account, login, balance enquiry, deposits, withdrawls consisting of a
menu, sub-menu and an exit option.

2.0 Aim/Benefits of the Micro-Project:


1. To develop Programs using Shell-Script methodology in Linux Environment..
2. To understand various concepts of if-else decidion making statements, case and
function in Linux Command Line OS.
[Link] develop an application using varied Linux commands.

3.0 Course Outcomes Addressed:


1. Install operating system and configure it.[✔]
2. Use operating system tools to perform various functions. [✔]
3. Execute process commands for performing process management operations. [✔]
4. Apply scheduling algorithms to calculate turnaround time and average waiting time[ ]
5. Calculate efficiency of different memory management techniques.[ ]
4.0 Literature Review:
Linux is a community of open-source Unix like operating systems that are based on
the Linux Kernel. Linux was created for personal computers and gradually it was used in
other machines like servers, mainframe computers, supercomputers, etc. Nowadays, Linux
is also used in embedded systems like routers, automation controls, televisions, digital
video recorders, video game consoles, smartwatches, etc. The biggest success of Linux is
Android (an operating system). Here, are the concepts of the Linux that we have used in
our Micro-Project:
Shell Script: A shell script is a computer program designed to be run by the Unix shell, a
command-line interpreter. The file extension of shell script is .sh and the code can be
written in text ediors like Vi/VIM, Nano, etc available in linux. In order to execute the
script, the file should be assigned with execute permission. Then it can be execute by
writing command $ ./[Link] in the terminal.

function(): Functions enable you to break down the overall functionality of a script into smaller,
logical sub-sections, which can then be called upon to perform their individual tasks when
needed. Functions provide code reuseability, which is an important part of modern OOP
principle.

Process Commands: Process is defined as a program in execution. We have used sleep


and kill process commands in our micro-project. Other process commands are ps, wait,
exit & many more.
$ Sleep 5 - It is used to execute command after certain amount of time by sleeping for
given seconds (here 5seconds).
$ kill 0 $$ -Used to stop execution of all the processes by sending an interrupt signal to
them.

The if...else statements: If else statements are useful decision-making statements which
can be used to select an option from a given set of options. The “fi” keyword is used to
indicate the end of if…else statements.

case: A “case...esac” statement construct helps us to simplify nested if statement. Each


case is an expression matching a certain pattern. The interpreter checks each case against
the value of the expression until a match is found. If nothing matches, a default condition
will be used. It is always ended with “esac” keyword.

Thus, this was all about the terminologies of our Project. The project Banking system
developed uses the function concept and thus code-reusability. The code is divided into 8
modules which can be re-used again and again. This is a subtle Bank application with
features of account opening and online transactions.

5.0 Actual Methodology Followed:


We divided our tasks and worked accordingly as per the planned methodology for our
project. But the actual steps followed by us in the real world are as follows:
1. We had a brain-storming session for the topic with group members & selected one of
the topics.
2. The selected topic was alloted by the respective teacher.
3. Discussed about the aim, outcomes, applications, outputs, etc. of the project in detail.
4. Divided the project activities of Algorithm, Flowchart, Code & Report-making
amongst the
four members.
5. Carried out background tasks like resource management which includes computer,
printer,
required softwares, etc. for the project.
6. A group of two members designed the algorithm and Flowchart.
7. Another team developed a Code as guided in the algorithm by following the steps as
mentioned
in flowchart.
8. Minor bugs were found by deep-analysis from each member which were later fixed on.
9. Final demonstration of the project was done in front of the whole class.
[Link], a full-proof project report was submitted before the deadline for the evaluation.
Algorithm:

Step 1 : Start

Step 2 : Declare the function MainMenu()

2.1 Take user input to switch between 3 options-


1. To_Open_Account
2. Login
3. Exit
2.2 After receiving the input , the respective function is called related to 1st or 2nd
options.
2.3 If user selects the 3rd option all the processes will be termiated (using kill
command) i.e. it will exit.
2.4 But if the user presses key other than 1,2,3 then it displays “invalid choice” &
calls the function MainMenu()

Step 3 : Declare the function To_Open_Account()

3.1 Take User Details as Input.


3.2 Display Randomly generated “account no”. & “secret pin”.
3.3 Also declare variable named “balance” and assign it value 1000.
3.4 Display message as “Rs.1000 deposited as initial account opening balance”.
3.5 Call function Login().

Step 4 : Declare the function Login()

if user enters correct account_no. and password


then
display “login successful” & call function Menu()
Else
display “Invalid Details” & call function MainMenu()

Step 5 : Declare the function Menu()

5.1 Take user input to switch between 4 options-


1. Balance Enquiry
2. Deposits
3. Withdrawls
4. Main Menu.
5.2 After receiving the input , the respective function is called related to any 1 of the
above available options.
5.3 But if the user presses key other than 1,2,3,4 then it displays “invalid choice” &
calls the function MainMenu()
Step 6 : Declare the function Balance_Enquiry()

6.1 Display the availabe balance of user logged in.


6.2 Again call the function Menu()

Step 7 : Declare the function Deposits()

7.1 Take user input for the amount that is to be deposited.


7.2 Display “Transaction Successful” & Display updated available balance.
7.3 Again call the function Menu()

Step 8 : Declare the function Withdrawls()

8.1 Take user input for the amount that is to be withdrawn.


8.2 if amount is less than available balance,
then
display “Transaction successfu”l & Display updated available balance.
call the function Menu()
else
display “enter lesser amount”.
8.3 Again call the function Menu()

Step 09 : Call the function MainMenu()

Step 10 : Stop.
Flowchart:
Start

Main
Men
u

function Open function function Display Invalid


Account() Login() Exit() Choice

Stop
If acc_no.
& pin are
correct

Men
u

function Balance function function function Display


Enquiry() Deposits() Withdrawls() MainMenu() Invalid
Choice
Program Code:
function MainMenu() {
echo "_________________________________________________________________"
echo " Welcome to XYZ Banking Application"
echo "_________________________________________________________________"
echo "1. Open New Account"
echo "2. Login"
echo "3. Exit Application"
echo "_________________________________________________________________"
read choice
case $choice in
"1") Open_New_Account
;;
"2") Login
;;
"3") kill 0 $$
;;
*) echo "Invalid Choice..!"
MainMenu
esac
}

function Open_New_Account() {
echo "Enter your Name"
read name
echo "Enter your Pan Card No."
read pan_no
echo ""
echo "Good! Your Details are Verified!"
echo "Rs. 1000 deposited as Initial Opening Balance"
let balance="1000"
sleep 5;

let acc="$RANDOM"
echo "_________________________________________________________________"
echo "Your Account no. is " $acc
let paswd="$RANDOM"
echo "Your Secret Pin is " $paswd
sleep 5;

Login
}

function Login() {
echo "_________________________________________________________________"
echo " XYZ Bank Login Portal"
echo "_________________________________________________________________"
echo "Enter your Account no."
read response1
echo "Enter your Secret Pin"
read response2

If [[ $response1 == "$acc" && $response2 == "$paswd" ]]

then
echo "Login Successful...!"
sleep 5;
Menu
elif [ $response1 -ne "$acc" ]
then
echo "**Invalid Account No.**"
sleep 5;
MainMenu
else
echo "**Invalid Pin**"
sleep 5;
MainMenu
fi
}
function Menu() {
echo "_________________________________________________________________"
echo " **MENU**"
echo "_________________________________________________________________"
echo ""Press 1"" - "For Balance Enquiry"
echo ""Press 2"" - "To Deposit Cash"
echo ""Press 3"" - "To Withdraw Cash"
echo ""Press 4"" - "Main Menu"
echo "_________________________________________________________________"
read option
case $option in
"1") Balance_Enquiry
;;
"2") Deposit_Money
;;
"3") Withdraw_Money
;;
"4") MainMenu
;;
*) echo "Invalid Choice..!"
Menu
esac
}
echo""

function Balance_Enquiry() {
echo "Your Available Balance is Rs. "$balance
echo ""
sleep 5;
Menu
}
function Deposit_Money() {
echo " Deposits"
echo "_________________________________________________________________"
echo "Enter the amount you want to Deposit:"
read dep_amt
echo ""

echo "Rs. $dep_amt Deposited Successfully in your Account."


echo ""
let balance=balance+$dep_amt
echo "Your Available Balance is Rs. "$balance
echo ""
sleep 5;
Menu
}
function Withdraw_Money () {
echo " Withdrawls"
echo "_________________________________________________________________"
echo "Enter the amount you want to Withdraw:"
read wdrw_amt
echo ""
if [ $wdrw_amt -lt $balance ]
then
echo "Rs. $wdrw_amt Withdrawn Successfully from your Account."
echo ""
let balance=$balance-$wdrw_amt
echo "Remaining Balance is Rs. "$balance
else
echo "**Low Balance !!**"
echo "Please enter lesser Amount."
fi
echo ""
sleep 5;
Menu
}

MainMenu
7.0 Outputs of the Micro-Project:
Main Menu of the Application-

Selecting the 1st Option-

Logging in with Details-


Logging in with wrong Details

Sub-Menu is displayed after login if correct credentials are entered-

Depositing of money-

Withdrawl of money-
Withdrawing amount greater than Balance amount-

Entering the wrong Choice-


Exit the Application-
8.0 Skill Developed / Learning outcomes:
The following skills were developed while developing this micro-project-
1. Able to use Linux Environment.
2. Developing a Shell-Script Program using different concepts.
3. Subtle Application development.
4. Research Analysis and Information Gathering.
5. Problem solving Approach.
6. Time management.
7. Technical Writing.
8. Team work.
9. Project Documentation.

9.0 Applications of the Micro-Project:


By viewing the different aspects of this micro-project, we can enlist its applications in
different areas as follows:

1. Its useful for the individuals having their interest in areas of command line interface
like Linux
operating systems.
2. Kali Linux is continuously being used as a key tool for hackers and CyberSecurity
professionals
all over the world.
3. This project is also benificial for building secure and robust applications in Linux
Environment.
4. Simple and Subtle softwares can be made very easily.
5. Android, which has emerged as an advanced OS, is based on the modified version of
the Linux
kernel and other open source software. It is continuously being used in Mobile Phones
and now
in TVs giving boost to the smarter technology.
10.0 Conclusiom:
In conclusion, the operating system(OS) is a critical component of modern
computing systems that plays a pivotal role in managing hardware
resources,enabling user interation, and ensuring the efficient and secure
operation of computer systems.
The shell script is the very powerfull process in the operating system. A shell
script is a computer program designed to be run by the Unix shell, a command-line
interpreter. The file extension of shell script is .sh and the code can be written in
text ediors like Vi/VIM, Nano, etc available in linux. In order to execute the script,
the file should be assigned with execute permission. Then it can be execute by
writing command $ ./[Link] in the terminal.

10.1 References:
[Link]
[Link]
[Link]

You might also like