# HG changeset patch # User xuebing # Date 1333216983 14400 # Node ID 4f17738e02542fd19aba1c07ea893a280088f3be Uploaded diff -r 000000000000 -r 4f17738e0254 bed_sort_with_header.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bed_sort_with_header.xml Sat Mar 31 14:03:03 2012 -0400 @@ -0,0 +1,23 @@ + + sort intervals with header lines + head -n $skip $input > $output + && tail -n+`expr $skip + 1` $input | sort -k1,1 -k2,2g >> $output + + + + + + + + + + +**Description** + +Unix command used:: + + head -n $skip $input > $output + tail -n+`expr $skip + 1` $input | sort -k1,1 -k2,2g >> $output + + +