Question: Write a bash script that prompts the user for the name of a file or directory and then tests theinput as to whether it exists

Write a bash script that prompts the user for the name of a file or directory and then tests theinput as to whether it exists or not. If the input name exists, report (print to the console) whattype of object it is: regular file, directory, or another kind -- for example a symbolic link.Next, add the ability to input test values via the command line in lieu of reading user input viathe read command. Note: this is not "either or". Your script should handle both and actaccordingly, i.e., if the user executes your script by typing