I've come up with a simple shell script that works, but I want to refine it a bit so maybe some others can use it. Basically, it allows to me open a file from certain directory regardless of my cwd:
Lets me just enter last part of the file, and there it is.
I would like to
1) check to see if the script returns more than one result, if so echo them, so I can narrow it down.
2)If return is null (no matching file), check in a 2nd directory. If still not found, echo a warning and exit, do not display the blank tmp file. I don't expect anyone to do it for me, just some opinions, keywords or links will work. I usually would use perl for something like this, but I want to learn some shell scripting as well, TIA-. Not sure if it's important, but OS=RedHat
Joe
Because a thing seems difficult for you, do not think it impossible for anyone to accomplish.
Marcus Aurelius
Code:
vi `ls /home/jriggs/dox/*"$*" `
I would like to
1) check to see if the script returns more than one result, if so echo them, so I can narrow it down.
2)If return is null (no matching file), check in a 2nd directory. If still not found, echo a warning and exit, do not display the blank tmp file. I don't expect anyone to do it for me, just some opinions, keywords or links will work. I usually would use perl for something like this, but I want to learn some shell scripting as well, TIA-. Not sure if it's important, but OS=RedHat
Joe
Because a thing seems difficult for you, do not think it impossible for anyone to accomplish.
Marcus Aurelius