#!/bin/bash prog=(./pin.py -e -f ucodyn) mkdir -p results/ touch results/vwh.out touch results/exp.out for enr in $(seq 0.5 0.5 20.0); do echo "Running for enrichment: ${enr}..." # 1. Basic calculation without homogenization "${prog[@]}" -t none -en $enr > results/explicit.out exp_keff=$(cat results/explicit.out| grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1) exp_pm=$(cat results/explicit.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2) echo $enr $exp_keff $exp_pm >> results/exp.out # 2. VWH calculation "${prog[@]}" -t vwh -en $enr > results/vwh.out vwh_keff=$(cat results/vwh.out| grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1) vwh_pm=$(cat results/vwh.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2) echo $enr $vwh_keff $vwh_pm >> results/vwh.out echo "Found ${exp_keff} and ${vwh_keff}!" done