Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!stanford.edu!leland.Stanford.EDU!rgupta From: rgupta@leland.Stanford.EDU (Rajesh Gupta) Newsgroups: comp.unix.shell Subject: Re: Help with here; supplying data to interactive prgm Message-ID: <1991Mar15.002028.24365@leland.Stanford.EDU> Date: 15 Mar 91 00:20:28 GMT References: Organization: Computer Systems Laboratory, Stanford University Lines: 46 In article eesnyder@boulder.Colorado.EDU (Eric E. Snyder) writes: >This is my first post... hope this is the right place! ... > > >The next program requires a loop to input the files since it requires >a couple of different files for each $file (ie .pro, .lcd, etc.). This >DOESN'T work and I which it did; there has got to be a better way! > >echo 'finding lowest common denominator' >echo '' ># making here doc for lcd >echo $#argv > ~/tmp/lcd_args >foreach file ($argv[*]) > echo $file.pro >> ~/tmp/lcd_args > echo $file.lcd >> ~/tmp/lcd_args > end >lcdpdbauto << ~/tmp/lcd_args > > > >Any suggestions? >Thanks! How about this: # echo # >! ~/tmp/junk echo "lcdpdbauto << lend" >> /tmp/junk echo $# >> /tmp/junk foreach file ($*) echo $file.pro >> /tmp/junk echo $file.lcd >> /tmp/junk end echo "lend" >> /tmp/junk /bin/csh -f /tmp/junk exit(0) Rajesh rgupta@sirius.stanford.edu