Created
March 8, 2019 00:23
-
-
Save rafadavis/6944880f6c87c4e83b718cfcd813076f to your computer and use it in GitHub Desktop.
bash_function_test
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
#!/bin/bash | |
# `chmod u+x search_script` | |
# to allow execution of script file | |
search_and_save () { | |
grep -A 2 -B 4 $1 *.txt > "$1".txt | |
} | |
"$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment