Solution 0 4 1

From Wiki Max
Revision as of 12:54, 9 December 2020 by Andrea Ferretti (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using bash scripting

#!/bin/bash
#
filein=$1
#
ene=`grep ! $filein | awk '{print $(NF-1)}'`
alat=`grep "lattice parameter" $filein | awk '{print $(NF-1)}'`
#
echo $alat $ene

Probably more elegant and general using awk or (as today's standard) python.