Skip to content

Instantly share code, notes, and snippets.

@ftessier
Created February 29, 2016 16:17
Show Gist options
  • Save ftessier/47886ee0ebadba5bbeac to your computer and use it in GitHub Desktop.
Save ftessier/47886ee0ebadba5bbeac to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
$count=0;
print " ";
while (<>) {
chomp;
# convert estar output to pegs format
$_ =~ s/^\s+//;
($energy, $param) = split(/ +/);
printf "%.2E,%.3E", $energy, $param;
$count++;
if ($count==4) {
$count = 0;
print "\n ";
}
else {
print " ";
}
}
print "\n ";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment