Skip to content

Instantly share code, notes, and snippets.

@brwnj
Last active January 24, 2017 23:56
Show Gist options
  • Save brwnj/5536490 to your computer and use it in GitHub Desktop.
Save brwnj/5536490 to your computer and use it in GitHub Desktop.
zhead
#!/usr/bin/env bash
n=$#
a=("${@}")
b=("${a[@]:0:$n-1}")
f=${a[$n-1]}
zcat $f | head ${b[*]}
@dnbaker
Copy link

dnbaker commented Jan 24, 2017

I have a zhead utility I've been using for a while that I just extracted from a project of mine in case you're interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment