Linux Shell Scripting Projects for Beginners – Command Line Test
The goal of this Linux Shell Scripting Project is to implement a login based online test platform using BASH Shell and commands.
About this project
|ESTIMATED TIME||40 hours|
|PUBLISHED||15th March, 2021|
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.
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
- Take Test
- View Test
- 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
- The script should time out if the user input is absent for more than 10 seconds on the main menu
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.
Here are the sample output expected by the end of Linux Shell Scripting Project execution.
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 timer
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