File: round_esp.sh

package info (click to toggle)
nwchem 7.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,134,820 kB
  • sloc: fortran: 4,903,090; ansic: 67,501; f90: 19,555; python: 17,912; java: 12,311; sh: 12,023; cpp: 9,896; perl: 6,123; csh: 4,345; makefile: 1,856; sed: 246; awk: 115; exp: 111; pascal: 76
file content (15 lines) | stat: -rwxr-xr-x 302 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
input_file=$1
read -r line < "$input_file"
echo "$line"
while IFS= read -r line || [[ -n "$line" ]]
do
    read  -n 2 -r elem
    if [ ! -z "$elem" ]; then
	printf "%2s\t " $elem
	for i in {1..8}; do
	    read  -n 12 -r x ; printf "%9.4f"  $x
	done
	printf "\n"
    fi
done < "$input_file"