Skip to content

Instantly share code, notes, and snippets.

@l-modolo
Created December 3, 2013 13:41
Show Gist options
  • Save l-modolo/7769281 to your computer and use it in GitHub Desktop.
Save l-modolo/7769281 to your computer and use it in GitHub Desktop.
add cluster number to each hit of cd-hist ouput file while removing the cluster number line
#!/bin/sh
cat file.hit.clstr | awk '{if ($1 == ">Cluster") {clusterNumber = $2} else {print(clusterNumber"\t"$0)}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment