Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!boulder!eesnyder From: eesnyder@boulder.Colorado.EDU (Eric E. Snyder) Newsgroups: comp.unix.shell Subject: Help with here; supplying data to interactive prgm Message-ID: Date: 12 Mar 91 15:42:33 GMT Sender: news@csn.org (news) Organization: Colorado SuperNet Inc. Lines: 51 Nntp-Posting-Host: beagle.colorado.edu This is my first post... hope this is the right place! I am trying to write a script which supplies data to a number of interactive programs. I have gotten this to work in the simplest case but I need to be able to expand shell variables for input to those programs. This works although it seems a but contrived: #!/bin/csh -f # This is a simple script to matchwater and ancillary programs # a set of two files. File names are taken as command-line # arguments. # echo 'preparing input files with splitwatpdb' foreach file ($argv[*]) echo $file splitwatpdb << + $file.pdb $file.pro $file.wat + end 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! --------------------------------------------------------------------------- TTGATTGCTAAACACTGGGCGGCGAATCAGGGTTGGGATCTGAACAAAGACGGTCAGATTCAGTTCGTACTGCTG Eric E. Snyder Department of MCD Biology ...don't mind me, University of Colorado, Boulder I'm just a biologist! Boulder, Colorado 80309-0347 LeuIleAlaLysHisTrpAlaAlaAsnGlnGlyTrpAspLeuAsnLysAspGlyGlnIleGlnPheValLeuLeu ---------------------------------------------------------------------------