Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!bonnie.concordia.ca!cidsv01.cid.aes.doe.CA!cidsv01.cid.aes.doe.CA!afsipmh From: afsipmh@cidsv01.cid.aes.doe.CA Newsgroups: comp.unix.shell Subject: Passing a var thru a file Message-ID: <1991Jun18.153222.20836@cid.aes.doe.CA> Date: 18 Jun 91 15:32:22 GMT Sender: afsipmh@cid.aes.doe.CA (Patrick Hertel) Reply-To: afsipmh@cidsv01.cid.aes.doe.CA () Distribution: na Organization: Environment Canada Lines: 17 Say i have a file that (just for the sake of this question) contains just one word: $ENVAR Say $ENVAR is an environmental variable What is it about the shell that prevents interpretation: #!/bin/sh var=`cat file` echo $var #gives (literally) $ENVAR echo `echo $var` #also gives (literally) $ENVAR -- Pat Hertel Canadian Meteorological Centre Analyst/Programmer 2121 N. Service Rd. phertel@cmc.aes.doe.ca Dorval,Quebec Environment Canada CANADA H9P1J3