Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!newsfeed.internetmci.com!news-was.dfn.de!news-fra1.dfn.de!news-ber1.dfn.de!news-lei1.dfn.de!news.urz.tu-dresden.de!irz401!orion.sax.de!uriah.heep!news From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: A simple csh script question Date: 31 Mar 1997 18:55:06 GMT Organization: Private BSD site, Dresden Lines: 25 Message-ID: <5hp1aa$b82@uriah.heep.sax.de> References: <332D9485.27FD@injapan.net> <86d8sy757n.fsf@g.pet.cam.ac.uk> <333b76fc.3575811@avlgate.avl.co.at> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) NNTP-Posting-Host: localhost.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: knews 0.9.6 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38279 schinagl@pe.avl.co.at (Hermann Schinagl) wrote: > ------------ > #!/bin/sh > > US=sun_test > > HOMEDIR=$(~$US) > echo $HOMEDIR > ------------ $ US=bin $ HOMEDIR="$(eval echo ~$US)" $ echo $HOMEDIR /home/bin You need the eval in order to force the re-evaluation of the tilde after the variable expansion. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)