#!/bin/sh

# Calculate cross-vector bilinears when both sets of vectors
# are on the same tape.

home=/home/cougar/qcd
prop=${home}/prop
tape=/dev/nrst1

num_vecs=2

set1_first=0 
set2_first=12

i=0

mt -f $tape asf $set1_first

while test $i -lt $num_vecs do

  #mtread $tape > $prop
  for i in 1 2 3 do
    record -i | head -4
    echo "..."
  done


  jump=`echo $set2_first - $set1_first | bc`
  echo $jump
  #mt -f $tape fsf $jump

  #bilins $state $prop $tape
  for i in 1 2 3 do
    record -i | head -4
    echo "..."
  done

  jump=`echo $set1_first - $set2_first + 1 | bc`
  echo $jump
  #mt -f $tape fsf $jump

  i=`echo $i + 1 | bc`

done

