File: otool_xtb

package info (click to toggle)
xtb 6.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,348 kB
  • sloc: f90: 139,236; fortran: 2,948; ansic: 2,215; makefile: 71; sh: 17; csh: 7; tcl: 7
file content (9 lines) | stat: -rwxr-xr-x 371 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash
args=("$@")
namespace=$(printf '%s\n' "${args[@]}" | awk 'namespace {print $0; namespace=0}; /--namespace/ {namespace=1}')
xtb "$@"
if [ -f "$namespace.energy" ]
then
   energy=$(cat "$namespace.energy")
   echo "$energy" | awk 'BEGIN {print "$energy"}; END {print "$end"}; NF == 2 {print $1, $2, $2, $2}; NF == 4 {print $0}' > "$namespace.energy"
fi