Skip to content

Instantly share code, notes, and snippets.

@SHDShim
Last active January 13, 2024 22:47
Show Gist options
  • Save SHDShim/2329ba348d37a22894ba448f8e012560 to your computer and use it in GitHub Desktop.
Save SHDShim/2329ba348d37a22894ba448f8e012560 to your computer and use it in GitHub Desktop.
Grep before and after a line

Grep in Agave

To find around keywords

After

grep -A 10 magnetic output-FM-20GPa.txt

Before

grep -B 10 magnetic output-FM-20GPa.txt

Before and After

grep -A 10 -B 10 magnetic output-FM-20GPa.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment