#!/bin/bash # 15 logspace Energien = 3 Macros × 5 pro Teilchen! ENERGIES_15=(30 47 75 118 186 294 464 732 1155 1825 2884 4555 7193 11349 17908) PARTICLES=(proton helium muon "e-") cd /home/et189/Geant4/G4ava/macros/ cp template_5energies.mac temp_template.mac for particle in "${PARTICLES[@]}"; do for ((macro=1; macro<=3; macro++)); do start=$(((macro-1)*5)) e1=${ENERGIES_15[start]} e2=${ENERGIES_15[$((start+1))]} e3=${ENERGIES_15[$((start+2))]} e4=${ENERGIES_15[$((start+3))]} e5=${ENERGIES_15[$((start+4))]} sed -e "s|\${PARTICLE}|${particle}|g" \ -e "s|\${SETNR}|${macro}|g" \ -e "s|\${E1}|${e1}|g" \ -e "s|\${E2}|${e2}|g" \ -e "s|\${E3}|${e3}|g" \ -e "s|\${E4}|${e4}|g" \ -e "s|\${E5}|${e5}|g" \ temp_template.mac > "BGO6cm_${particle}_${macro}.mac" echo "✅ BGO6cm_${particle}_${macro}.mac (${e1}-${e5} MeV)" done done rm temp_template.mac ls -la BGO6cm_*_*.mac