Print

Print


On 7 Nov 2012, at 19:49, Jacob Keller <[log in to unmask]> wrote:

> Dear Crystallographers,
> 
> does anyone have a script on hand which can:
> 
> -read in a tab-delimited dataset
> -determine whether each row in column X is above or below some input cutoff value Y,
> -outputs all such rows to a new file?
> 
> if someone already has this on hand, I would appreciate it--seems like it should be a very generally useful script to have around, and I need such right now…

This may work (at least with GNU and OS X awk):

  awk -F'\t' '{if ($X > Y) print $0;}' infile > outfile 

where X is the column number starting from 1, and Y is your cutoff.

// Johan


      Postdoctoral Fellow @ Physical Biosciences Division
_______________________________________________________________
    Lawrence Berkeley National Laboratory * 1 Cyclotron Rd.
Mail Stop 64R0121 * Berkeley, CA 94720-8118 * +1 (510) 495-8055