home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!rpi!zaphod.mps.ohio-state.edu!darwin.sura.net!nntp.msstate.edu!emory!ogicse!plains!news.u.washington.edu!carson.u.washington.edu!donn
- From: donn@carson.u.washington.edu (Donn Cave)
- Newsgroups: comp.unix.shell
- Subject: Re: recursive mkdir
- Message-ID: <1992Aug18.161744.27823@u.washington.edu>
- Date: 18 Aug 92 16:17:44 GMT
- References: <1992Aug12.234645.2589@newshost.lanl.gov> <glaze.093@glaze> <1992Aug18.033048.7574@physiol.su.OZ.AU>
- Sender: news@u.washington.edu (USENET News System)
- Organization: University of Washington
- Lines: 27
-
- john@physiol.su.OZ.AU (John Mackin) writes:
-
- | I get really tired of people who don't understand portability.
-
- Ain't it the truth. Alas, however, all it takes is some obscure old feature
- that you won't find on any platform at your disposal. The script you posted
- fails under DYNIX 3.1, on a Sequent Symmetry:
-
- $ sh mkdir ding/dong/ding/dong
- mkdir: ding/dong/ding/dong: No such file or directory
- mkdir: mkdir failed in directory /u1/donn
-
- This is basically a BSD 4.2 system, and the shell is so old that not only
- does it lack shell functions, it also behaves a bit different with separator
- characters. My recollection is that it specifically exempts "/" from the
- separator characters when expanding expressions, for some reason.
-
- | IFS="/$IFS"
- ...
- | for d in $arg
- | do
- | if test ! -d $d
- | then
- | if mkdir $d
-
- Donn Cave, University Computing Services, University of Washington
- donn@cac.washington.edu
-