Created
October 3, 2015 13:24
-
-
Save nicdoye/b928419054300f4131a1 to your computer and use it in GitHub Desktop.
Find all .pm files (in /usr/*/perl5)
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
#!/bin/bash | |
# I know it's a bit stupid and there's better ways to do it. But who doesn't like playing. | |
# Written for an old CentOS 4 server where people have installed Perl modules any old how. | |
# Is there a way to merge the two matches together? | |
find /usr/*/perl5 | ruby -ne '/^(\/\w+){4}\/.*\.pm/.match($_) && puts( /^(\/\w+){4}\/[\.\d]*\/{0,1}(.*)/.match($_)[2] )' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment