Skip to content

Instantly share code, notes, and snippets.

@dondelelcaro
Created December 20, 2017 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dondelelcaro/27846cf8983cc799bc459d7db8da14fc to your computer and use it in GitHub Desktop.
Save dondelelcaro/27846cf8983cc799bc459d7db8da14fc to your computer and use it in GitHub Desktop.
Example ~/.lessfilter to read bam files in less
#!/bin/sh
case "$1" in
*.bam)
samtools view $LESSPIPE_SAMTOOLS "$1"
;;
*)
# We don't handle this format.
exit 1
esac
# No further processing by lesspipe necessary
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment