#!/bin/csh # looks through the decoys directory for repacked pdb files (possibly gzipped) # and sorts their "total" lines into decoys/grep-best-rosetta rm -f decoys/grep-best-rosetta.tmp foreach x (decoys/*repack-nonPC.pdb* decoys/*repack.pdb* decoys/*redesign*.pdb*) echo -n $x : >> decoys/grep-best-rosetta.tmp if ( $x:e == gz ) then gunzip -c $x | grep total >> decoys/grep-best-rosetta.tmp else grep total < $x >> decoys/grep-best-rosetta.tmp endif end sort -g +16 decoys/grep-best-rosetta.tmp > decoys/grep-best-rosetta rm -f decoys/grep-best-rosetta.tmp