-
-
Save umhan35/5275316 to your computer and use it in GitHub Desktop.
grep '{first arg}' . -R
This file contains 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/ruby | |
if ARGV.length != 1 | |
print "[Exit] need 1 argument (now #{ARGV.length})\n" | |
exit | |
end | |
pattern = ARGV[0] | |
cmd = "grep '#{pattern}' . -R" | |
puts cmd | |
puts `#{cmd}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BASH version:
grep $1 . -R