How to write a script to prompt for filename to search and print all files on that filename

Published: 8/11/2019
How to write a script to prompt for filename to search and print all files on that filename
Source: UNIX.STACKEXCHANGE.COM

I have to write a script that prompts the user to enter a filename and then prints all the files on the system with that file name. So far I have this on my script.sh: #!/bin/bash echo "please enter filename" read filename if [ find . -name $filename ] //not sure if the condition is right then //print all files on the system with that file name not sure what to put here else echo "file does not

Read more
Related news
Comment
FACEBOOK