Last active
November 13, 2017 12:02
-
-
Save TimurAykutYildirim/3d11b5b4399a046c50a765a4c2e63694 to your computer and use it in GitHub Desktop.
small python script for searching string within all files of any directory. Should work just fine in any *nix systems
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
| import os | |
| import subprocess | |
| myString = str(raw_input('search key: ')) | |
| print myString | |
| myCommand= 'grep -rl "' + myString +'" /Users/timur/Desktop/ems' | |
| print myCommand | |
| os.system(myCommand) | |
| #result = subprocess.check_output([command]) | |
| #subprocess.Popen(command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment