Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!emory!gatech!prism!gt0178a From: gt0178a@prism.gatech.EDU (Jim Burns) Newsgroups: comp.unix.questions Subject: Re: How to execute !$var under csh? Message-ID: <14981@hydra.gatech.EDU> Date: 11 Oct 90 06:08:14 GMT References: <2234@lri.lri.fr> Organization: Georgia Institute of Technology Lines: 20 in article <2234@lri.lri.fr>, js@lri.lri.fr (Jose Lopes De Siqueira) says: > If I set a variable var with a command number, I would like to be able > to execute it as !$var. However, the ! command interpretes $ as the last > command string rather than what I expected it to do. How to overcome this > problem? How about: eval \!$var Beware tho', that when I tried it, if the selected command was an alias that itself sets a variable, (like an alias for 'cd' that sets the prompt), you may not get what you want. -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu