home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!fitzgb
- From: fitzgb@mml0.meche.rpi.edu (Brian Fitzgerald)
- Subject: Re: changing name of core file
- Message-ID: <q+zyzb=@rpi.edu>
- Nntp-Posting-Host: mml0.meche.rpi.edu
- Organization: Rensselaer Polytechnic Institute, Troy, NY
- References: <1992Sep3.210650.65595@evolving.com>
- Date: Fri, 4 Sep 1992 15:26:09 GMT
- Lines: 25
-
- Dan Stanger writes:
- >does anyone know how to change the name of the core file that will be
- >created if a program fails. we have several programs running in the
-
- Not without kernel sources.
-
- >same directory so if more than one of them fails the core file from
- >one overwrites the other. we would like to change the name to
- >program.core or somthing like that.
-
- Run the program as:
-
- program ; mv core program.core
-
- When "program" exits, then if "core" exists, it is renamed.
-
- This is the idea, anyway. You want a fancier shell script.
-
- #!/bin/sh
- program || test -f core && mv core program.core
-
- is a little better, but there's no assurance that you are renaming
- the right core file.
-
- Brian
-