home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!prism!ccoprrm
- From: ccoprrm@prism.gatech.EDU (Robert E. Minsk)
- Newsgroups: comp.sys.sgi
- Subject: Shell script problem
- Summary: rm not removing directories
- Message-ID: <81288@hydra.gatech.EDU>
- Date: 22 Jan 93 07:52:40 GMT
- Organization: Information Technology - High Performace Computing
- Lines: 21
-
-
- I have a shell script that creates a temporary directory writes some files
- to the directory then does a rm -rf "directory". The files are removed but
- the directory remains. If I try to do a rmdir in the shell script it
- return "Directory not empty". Parts of the shell script is listed below.
-
- #!/bin/sh
- SLATEDIR=/usr/tmp/slate.$$
- trap "rm -rf $SLATEDIR" 0 1 2 3 15
- mkdir $SLATEDIR
- "write some stuff in $SLATEDIR"
- exit 0
-
- The files are removed but not the directory. So I tried changing the trap to
- trap "rm -rf $SLATEDIR;rmdir $SLATEDIR" 0 1 2 3 15, but then it returns
- Directory not empty. Is this a problem with my shell script or with 4.0.5a?
- --
- Robert E. Minsk - DESIGNefx | After WREKage their is Ruins... |
- ARPA: ccoprrm@prism.gatech.edu | Fridays at 10pm WREK Atlanta 91.1 |
- uucp: ...!{allegra,amd,hplabs,seismo,ut-ngp}!gatech!prism!ccoprrm
- Georgia Institute of Technology, Atlanta Georgia, 30332
-