unix shell script [message #399255] |
Tue, 21 April 2009 05:40 |
vamsikrishnag
Messages: 16 Registered: October 2008
|
Junior Member |
|
|
Hi,
I have the following text file:
/KING
/KING/JONES
/KING/JONES/SCOTT
/KING/JONES/SCOTT/ADAMS
/KING/JONES/FORD
/KING/JONES/FORD/SMITH
/KING/BLAKE
/KING/BLAKE/ALLEN
/KING/BLAKE/WARD
/KING/BLAKE/MARTIN
/KING/BLAKE/TURNER
/KING/BLAKE/JAMES
/KING/CLARK
/KING/CLARK/MILLER
I would like to create the directory structure as mentioned above.
Assume that i am currently in GVK. all the directories should come under this directory.
Also i would like to avoid rows that are having spaces.
I have the following script.
while read file
do
if [ ! -d `$file` ] ; then
mkdir -p $file
fi ;
done < path.txt
Please suggest if any changes needs to be done or please send me the code.
Regards,
G.Vamsi Krishna
|
|
|
Re: unix shell script [message #399259 is a reply to message #399255] |
Tue, 21 April 2009 05:52 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
This question bears no connection with Oracle.
Please find a more appropriate forum.
The topic is locked.
Regards
Michel
|
|
|