Pop current directory until specific file is found
- by edarroyo
I'm interested in writing a script with the following behavior:
See if a file, build.xml, exists in the current directory, if so run a command supplied through arguments to the script.
If not, pop the current directory and look at the parent. Go to 1.
The script would end once we find the file or we reach the root. Also, once the script finishes and control comes back to the user I want the current directory to be that one where the script was initially l
I'm not very familiar with shell scripting but any help/guidance will be much appreciated.