home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!cc.ic.ac.uk!imperial.ac.uk!vulture
- From: vulture@imperial.ac.uk (Thomas Sippel - Dau)
- Subject: Re: Access to aliases ????
- Message-ID: <1992Dec23.120423.20688@cc.ic.ac.uk>
- Sender: vulture@carrion.cc.ic.ac.uk (Thomas Sippel - Dau)
- Nntp-Posting-Host: cscgc
- Reply-To: cmaae47@imperial.ac.uk
- Organization: Imperial College of Science, Technology and Medicine
- References: <989@rc1.vub.ac.be>
- Date: Wed, 23 Dec 92 12:04:22 GMT
- Lines: 29
-
- In article <989@rc1.vub.ac.be>, jcu@dec5.ulb.ac.be (Jean-Christophe Ury) writes:
- -
- - It may seems stupid but I ask you anyway,
- -
- - I use ULTRIX V4.3.
- - I 've some aliases defined in my shell.I would access these aliases via
- - a C program. Is it possible.
-
- It is easy, but you won't like the answer:
-
- 1.) read the .cshrc file (fraught woth problems), or
-
- 2.) execute (from C) something like
-
- system ("csh -c alias >/tmp/myaliases");
-
- and read the resulting file.
-
- This will not access those that you have typed into the current shell,
- but is otherwise a lot easier, since you don't have to parse the ifs
- and buts of csh syntax.
-
- Thomas
- --
- *** This is the operative statement, all previous statements are inoperative.
- * email: cmaae47 @ ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic on Janet)
- * voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
- * snail: Imperial College of Science, Technology and Medicine
- * The Center for Computing Services, Kensington SW7 2BX, Great Britain
-