Created
August 24, 2016 00:46
-
-
Save nooitaf/e885b9358f6a40eb2ce45daa7ce0276c to your computer and use it in GitHub Desktop.
Linux Cheatsheet
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
#!/bin/bash | |
# find something in first line, outputs filepath and file | |
find . -type f -exec sh -c "if head -n 1 {} | grep 'firrst row text' > /dev/null; then echo {}; cat {}; fi; " \; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment