Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!usc!ucsd!pacbell.com!ames!dftsrv!chris From: chris@asylum.gsfc.nasa.gov (Chris Shenton) Newsgroups: comp.unix.shell Subject: Delayed evaluation of csh variables? Message-ID: Date: 10 Dec 90 21:03:08 GMT Sender: news@dftsrv.gsfc.nasa.gov Organization: NASA Goddard Space Flight Center; Greenbelt, MD Lines: 19 I'm trying to do a script where I set up a variable to contain a template, then later instantiate one of the variables; the whole thing then is passed to a command. Something like this, conceptually: #!/bin/csh set COMMAND = "command" set OPTION_TEMPLATE = "-Z '$File'" # Want *literal* $File # -- to be evaluated *later* -- # but csh evaluates it now and dies foreach File ( $* ) # Instantiate in $OPTION_TEMPLATE ?? $COMMAND $OPTION_TEMPLATE # doesn't work end Is there a way to do this? Thanks in advance. -- chris@asylum.gsfc.nasa.gov, ...!uunet!asylum.gsfc.nasa.gov!chris, PITCH::CHRIS