home *** CD-ROM | disk | FTP | other *** search
/ norge.freeshell.org (192.94.73.8) / 192.94.73.8.tar / 192.94.73.8 / pub / computers / 3b2 / rmkdir < prev    next >
Text File  |  1985-07-02  |  257b  |  21 lines

  1. #
  2. # rmkdir
  3. #
  4. # Recursively make directories.
  5. #
  6.  
  7. set -ue
  8. myname=${0}
  9.  
  10. for dir
  11. do
  12.     if [ ! -d "${dir}" ]
  13.     then
  14.         ${myname} "`ignore expr \
  15.             ${dir-.}'/' : '\(/\)[^/]*/$' \
  16.             \| ${dir-.}'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \
  17.             \| .`"
  18.         mkdir "${dir}"
  19.     fi
  20. done
  21.