home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!uunet.ca!geac!r-node!pseudo!mjn
- From: mjn@pseudo.uucp (Murray Nesbitt)
- Subject: Re: expanding ~'s in a directory name.
- Organization: Private system in Toronto, ON
- Date: Fri, 31 Jul 1992 12:37:05 GMT
- Message-ID: <MJN.92Jul31043705@pseudo.uucp>
- In-Reply-To: aroll@gucis.cit.gu.edu.au's message of 29 Jul 92 01:26:29 GMT
- References: <1992Jul29.012629.14000@gucis.cit.gu.edu.au>
- Sender: mjn@pseudo.uucp (Murray Nesbitt)
- Lines: 23
-
-
- In article <1992Jul29.012629.14000@gucis.cit.gu.edu.au> aroll@gucis.cit.gu.edu.au (Ashley Roll) writes:
-
- >My problem is how do I expand ~'s. I want to expand then the way that csh does
-
- >Has anyone written or got code that will do this that I can use? Or is there
- >a library function that will do this.
-
- I don't care^H^H^H^Hknow about the csh, but the following should work
- with sh and ksh:
-
- #include <stdlib.h>
-
- char *expanded_tilde;
-
- expanded_tilde = getenv("HOME");
-
-
- To be completely honest, it should work under the csh, too.
-
- Murray
- --
- Until my site's in the maps, please reply to "druid!pseudo!mjn".
-