Last active
May 21, 2021 14:58
-
-
Save mazzma12/b8a988d0e621af678fcadd655f1d13a2 to your computer and use it in GitHub Desktop.
Find and grep occurences in file
This file contains hidden or 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 | |
# Find THE notebook you have lost | |
expr=$1 # The content you are looking for : "*myCode*" | |
files=${2:-*.ipynb} # File patterns | |
find . -type f -name "$files" -exec grep -E "$expr" --with-filename {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment