Help with here; supplying data to interactive prgm

Rajesh Gupta rgupta at leland.Stanford.EDU
Fri Mar 15 10:20:28 AEST 1991


In article <eesnyder.668792553 at beagle> eesnyder at 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 at sirius.stanford.edu



More information about the Comp.unix.shell mailing list