dendenners
Programmer
Hi there,
I have a shell script that takes in a directory name as an argument (e.g. /usr/locl/bin ). The script must check if each individual directory in the argument exists, and if not, it creates it. I was wondering how to get awk to return the left-most directory to 1 variable, (in the above example /usr) and also return the rest of the directory argument to a second variable (in the above example locl/bin) so that I can recurse through the entire argument. Any help would be greatly appreciated.
I have a shell script that takes in a directory name as an argument (e.g. /usr/locl/bin ). The script must check if each individual directory in the argument exists, and if not, it creates it. I was wondering how to get awk to return the left-most directory to 1 variable, (in the above example /usr) and also return the rest of the directory argument to a second variable (in the above example locl/bin) so that I can recurse through the entire argument. Any help would be greatly appreciated.