Last active
June 28, 2017 22:12
-
-
Save crosenth/9cfc4667b15e305c068ef98ee1baa50b to your computer and use it in GitHub Desktop.
header grep - Always print the first line of a file before grep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
csvfile=${@: -1} | |
head --lines 1 $csvfile && grep "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment