22. Complex Condition HandlingWrite a complex script that simulates a basic login system. The script should:→ Take a username and password as input.→ Use arrays to store valid usernames and their cor…
21. Advanced List Handling with `case`Write a script that uses an array to store a list of valid usernames. Take a username as input and use a `case` statement to check if the input username is in th…
20. Nested `case` StatementsWrite a script that takes a user input for a day and time (morning, afternoon, evening) and prints a specific message for each combination using nested `case` statements.
19. Handling Multiple Values in `case`Write a script that takes a command-line argument and prints whether it is a start, stop, or restart command using a `case` statement. If the argument is none of…
18. Pattern Matching with Wildcards using `case`Write a script that takes a filename as input and checks if the file is a text file (*.txt), image file (*.jpg, *.png), or an unknown type using a `cas…
16. Using `[[ ]]` for Complex ConditionsWrite a script that takes a string as input and checks if the string starts with "A" and ends with "Z". Use `[[ ]]` for the condition.
14. Combining String and Number ComparisonsWrite a script that takes a username and age as input. Check if the username is not empty and the age is greater than 18. Print an appropriate message.
13. Number ComparisonWrite a script that takes two numbers as input and checks if the first number is greater than, less than, or equal to the second number.
11. Understanding Exit CodesWrite a script that attempts to create a directory. Check the exit code of the `mkdir` command and print whether the directory was created successfully or not.
10. Combining Conditions with Logical OperatorsWrite a script that takes two numbers as input and checks if both numbers are positive using logical AND. Print an appropriate message.