Linux Shell Scripting Projects For Beginners
Command Line Test Project

HomeLinux Systems | Course HomeLinux Systems | Projects Linux Systems Project | Command Line Test

Linux Shell Scripting Projects for Beginners – Command Line Test

Project Brief

The goal of this Linux Shell Scripting Project is to implement a login based online test platform using BASH Shell and commands.

Share via :

About this project

TYPE Individual project
DIFFICULTY Intermediate
ESTIMATED TIME 40 hours
PUBLISHED 15th March, 2021
CONTACT training@emertxe.com

Introduction

Command line test is a BASH shell based tool that simulates login based online testing scenario. Initially the user will be provided with a sign-in option where pre-defined users will be allowed to log in. Upon successful login this tool will display questions for the user from existing data-base. It will also handle error conditions like time-out. This tool will also store answers provided by users for future verification.

These days there are a lot of online test platform which enables students to take tests online. They will typically have a user-interface, backend question bank and evaluation part. They will also support other features like predefined time per question, output reports etc. The idea of this project is to simulate such an online test interface using Linux Shell Scripting and commands. 

By  implementing this Linux Shell Scripting Projects for Beginners Project will make you apply Shell programming constructs (ex: loops), Pattern matching commands (ex: grep, sed etc…) and File handling (ex: permission, directories etc…) aspects during implementation. 

Requirement Details

Following are the requirements for this Linux Shell Scripting Project. Divided into various sections. 

  • Provide a prompt for the user to sign-up and sign-in
      • Sign In
        1. Take Test
        2. View Test
      • Sign up
      • Exit
  •  Using sign-up user can register with a user-id and password
  • Ask for user-name. The user-name should contain only alphanumeric symbols
  • Ask for new password. The password can contain any symbol in it. Accept at-least 8 characters
  • with at-least a number and symbol
  • Ask the user to re-enter the password again for validation

  • Already registered user can sign-in with ID and password
      • The script should prompt for user-name and password
      • The password should be like a shadow password
      • Show error in-case passwords mismatches
  • Create log file
      • Every activity while the script is to be logged in test_activity.log file.
      • Keep date and time along with every activity.
  • Question bank
      • User should provide a question bank file along with the script
      • If not search for a file named question_bank.txt as a default question bank.
  • Taking a test
      • Should create a directory called “.TestData” in user’s directory structure. For example, like –  ECEP/LinuxSystems/Projects directory if it doesn’t exist.
      • Create a file named “answer_file.csv” under TestData directory if it doesn’t exist.
      • Prompt the user with questions one by one randomly picked from the question_bank.
      • Prompt for questions with multiple choice
      • Every question should be timed, say 10 seconds
      • On timeout the question should change with fresh time
      • Every answer should be stored in answer_file.txt with the question separated by comma
      • The answer should be stored with attempt time (say if I answer within 5 seconds, then my answer with 5 seconds (attempt time) should be stored
      • If the user chooses this option, the script should show all the questions with all options, the answer should be highlighted
      • All the user entered answer have to be entered in the answer_file.csv
  • Time-out
    • The script should time out if the user input is absent for more than 10 seconds on the main menu

Skeleton Code

The skeleton code in a very interesting concept used in Emertxe. By looking into the skeleton code, you will get a clear picture into converting the given requirement into a working solution. This will also take care of important aspects like modularity, clean coding practices, re-usability etc, while building a real-time Linux Shell Scripting Project.

 

 

Sample Output

Here are the sample output expected by the end of Linux Shell Scripting Project execution.

Linux Shell Scripting Projects for Beginners | Command Line Test Project | Sample Output - 1
Fig1: Main Screen

Fig2: Sign Up Screen

 

Fig3: Sign Up Screen, Credentials Entered. Note the Password should be Shadow Password

 

Fig4: Sign Up with the same User Name again!!

 

Fig5: Main Screen. Proceeding to Sign In Screen

 

Linux Shell Scripting Projects for Beginners | Command Line Test Project | Sample Output - 6
Fig6: Sign In Screen. The Password should be a Shadow Password

 

Linux Shell Scripting Projects for Beginners | Command Line Test Project | Sample Output - 7
Fig7: Features Screen. Proceeding to Take a Test

 

Linux Shell Scripting Projects for Beginners | Command Line Test Project | Sample Output - 8
Fig8: Test in progress. Every question is Timed. On timeout  it should proceed to the next question. The time should be a down counter (Say 10 to 0 Secs)

 

Linux Shell Scripting Projects for Beginners | Command Line Test Project | Sample Output - 9
Fig9: Test completion screen. It should automatically logged  out within the specified amount of time

 

Linux Shell Scripting Projects for Beginners | Command Line Test Project | Sample Output - 10
Fig10: View Test Screen. It should highlight the user  selected  answers and possibly with correct answer

 

Fig11: Expected Output Files containing all user information

 

Fig12: User Answer Database

 

Fig13: User Credentials

 

Fig14: Question Bank

 

Fig15: User Activity Log file
Requirement Details
  • Provide a prompt for the user to sign-up and sign-in
  •  Using sign-up user can register with a user-id and password
  • Already registered user can sign-in with ID and password
  • Create log file
  • Question bank
  • Taking a test
  • Time-out
Sample Output
  • Fig1: Main Screen

  • Fig2: Sign Up Screen
  • Fig3: Sign Up Screen, Credentials Entered. Note the Password should be Shadow Password
  • Fig4: Sign Up with the same User Name again!!
  • Fig5: Main Screen. Proceeding to Sign In Screen
  • Fig6: Sign In Screen. The Password should be a Shadow Password
  • Fig7: Features Screen. Proceeding to Take a Test
  • Fig8: Test in progress. Every question is Timed. On timeout  it should proceed to the next question. The time should be a down counter (Say 10 to 0 Secs)
  • Fig9: Test completion screen. It should automatically logged  out within the specified amount of time
  • Fig10: View Test Screen. It should highlight the user  selected  answers and possibly with correct answer
  • Fig11: Expected Output Files containing all user information
  • Fig12: User Answer Database
  • Fig13: User Credentials
  • Fig14: Question Bank
  • Fig15: User Activity Log file
Requirement Details
  • Provide a prompt for the user to sign-up and sign-in
  •  Using sign-up user can register with a user-id and password
  • Already registered user can sign-in with ID and password
  • Create log file
  • Question bank
  • Taking a test
  • Time-out
Sample Output
  • Fig1: Main Screen

  • Fig2: Sign Up Screen
  • Fig3: Sign Up Screen, Credentials Entered. Note the Password should be Shadow Password
  • Fig4: Sign Up with the same User Name again!!
  • Fig5: Main Screen. Proceeding to Sign In Screen
  • Fig6: Sign In Screen. The Password should be a Shadow Password
  • Fig7: Features Screen. Proceeding to Take a Test
  • Fig8: Test in progress. Every question is Timed. On timeout  it should proceed to the next question. The time should be a down counter (Say 10 to 0 Secs)
  • Fig9: Test completion screen. It should automatically logged  out within the specified amount of time
  • Fig10: View Test Screen. It should highlight the user  selected  answers and possibly with correct answer
  • Fig11: Expected Output Files containing all user information
  • Fig12: User Answer Database
  • Fig13: User Credentials
  • Fig14: Question Bank
  • Fig15: User Activity Log file

similar projects