# How to extract the Pressure, Energy and unit-cell volume from quantum ESPRESSO output file using bash script?

I needed the Energy and Volume values for predicting the bulk modulus of a crystal via the Birch Murmaghan equation. Can I get a bash script for doing the same.

You can use the following script to do the extraction rather than manually looking through the entire document:

#!/bin/sh

grep "A=" Input_file_name.in
grep "unit-cell volume" Output_File_Name.out
grep "!" Output_File_Name.out
grep -A 5 "Computing stress" Output_File_Name.out


Copy and paste the above code snippet into a file named "File_Name.sh" use the following command to make it executable.

chmod +x File_Name.sh


Run the script as follows

./File_Name.sh