Skip to content

Instantly share code, notes, and snippets.

@Findus23
Created April 15, 2018 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Findus23/5b2dbbdb664c3fca82ea6dc472035e27 to your computer and use it in GitHub Desktop.
Save Findus23/5b2dbbdb664c3fca82ea6dc472035e27 to your computer and use it in GitHub Desktop.
# extract proj/target particle numbers from the logfile:
if [ `grep -c "Particle numbers:" $1/simulation.logfile` != "1" ]; then
echo "ERROR! Ambiguity encountered!"
exit
fi
N_P=`grep -A 3 "Particle numbers:" $1/simulation.logfile | grep "projectile:" | cut -d\ -f6`
N_T=`grep -A 3 "Particle numbers:" $1/simulation.logfile | grep "target:" | cut -d\ -f10`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment