Help with here; supplying data to interactive prgm
Eric E. Snyder
eesnyder at boulder.Colorado.EDU
Wed Mar 13 01:42:33 AEST 1991
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
---------------------------------------------------------------------------
More information about the Comp.unix.shell
mailing list