Hello Friends, Recently I wanted to test my skill-set in Linux for review. I searched online for a free MCQ-like exam for LInux but unfortunately couldn't find one. So I decided to create one MCQ test exam script entirely written in Bash Shell script. After many hours of work here I am presenting a Linux MCQ test of 1000 questions in bash.
Because it is easy and super portable. Most Linux boxes are running with bash. And as a Linux admin, it is easy to do so. Bash shell is the native way of interacting with Linux. In terms of portability just copy the folder on any linux box running with bash and required dependency and it would work.
No, it doesn't require any working internet connection for the MCQ Test Exam.
It's a completely offline application and doesn't save any user data online. All data is saved locally in the user system.
The application requires the following commands installed on your system. Some of them are built-in commands with bash but ensure those commands are present or already installed on your system before starting the MCQ test exam.
- bash
- sudo
- gpg
- awk
- sed
- read
- mkdir
- date
- basename
- readlink
- realpath
Install shc package
#enable epel repo
yum install epel-release
yum --disablerepo=* --enablerepo=epel install shc -y
sudo apt install shc
The steps to use this application are as follows
Clone the repo with the following command.
git clone https://github.com/santosh2712/linux_mcq_test_1000_question_in_bash_shell_script.git
once the repository is copied on your system. Change directory to repository directory with cd command.
cd linux_mcq_test_1000_question_in_bash_shell_script/
Just start the MCQ test by running the following command on the terminal.
[santosh@CentOS8 linux_mcq_test_1000_question_in_bash_shell_script]$ ll
total 60
-rwxrwxr-x. 1 santosh santosh 57240 Sep 28 14:19 linux_mcq_test_1000_question_in_bash_shell_script_by_santosh_kulkarni
-rw-rw-r--. 1 santosh santosh 102 Sep 28 14:19 README.md
drwxrwxr-x. 2 santosh santosh 6 Sep 28 14:19 Temp
[santosh@CentOS8 linux_mcq_test_1000_question_in_bash_shell_script]$ ./linux_mcq_test_1000_question_in_bash_shell_script_by_santosh_kulkarni
# file linux_mcq_test_1000_question_in_bash_shell_script_by_santosh_kulkarni
linux_mcq_test_1000_question_in_bash_shell_script_by_santosh_kulkarni: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=45be113f836f866ede9239399db1ad7de6ccc747, stripped
On checking of dependency, requirement user will be asked for the username as shown below enter username without spaces
./linux_mcq_test_1000_question_in_bash_shell_script_by_santosh_kulkarni
As shown in image below
It will start or resume an MCQ test session for the user. On fresh start choose the number of MCQ test chapters you want to take test. As shown in below image.
This will start MCQ Test EXAM for user. As shown in below image.
Note: You have to input only Option A or B or C or D to choose your answer. As shown in above pic. If The answer is correct following window will be shown.
It will wait for 10 Seconds to see the expanation of the answer. Later it will move to next Question in chapter. As shown in below image.
It will Update Question Completed , Correct Answer and Incorrect Answer Column . As shown in above image.
This application has following features.
It is written entirely in bash. No major dependency overhead as bash is part of major Linux distributions.
Since it's a shell script. We can port this application to any linux box by copying the script directory. Ensure dependency packages are installed on the system.
It's a complete offline application.
The live MCQ test status bar will be shown in the application terminal. With this users can keep an eye on overall progress and performance on the test, like Total Questions, Correct answers, and Incorrect answers.
This is one of the best features of the script. It has a question set of 1000 questions. Attempting to complete a chapter in one go is quite difficult for anyone. Hence resuming the MCQ test is quite a good feature, It saves user time and energy.
Super lite in nature as it only uses a few command. It can be run on any linux box.
https://github.com/santosh2712/linux_mcq_test_1000_question_in_bash_shell_script