Skip to content

Instantly share code, notes, and snippets.

@rafadavis
rafadavis / search_script
Created March 8, 2019 00:23
bash_function_test
#!/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
}
"$@"