Difference between revisions of "Solution 0 4 1"
Jump to navigation
Jump to search
(Created page with " Using bash scripting #!/bin/bash # filein=$1 # ene=`grep ! $filein | awk '{print $(NF-1)}'` alat=`grep "lattice parameter" $filein | awk '{print $(NF-1)}'` # echo $a...") |
|||
Line 1: | Line 1: | ||
+ | * Back to the previous page: [[Scripting#Exercises|Exercises]] | ||
Using bash scripting | Using bash scripting |
Revision as of 10:51, 1 December 2020
- Back to the previous page: Exercises
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.