Closed BenWiederhake closed 7 years ago
Hey!
I'm not looking to merge solutions in (The point of the repo is to give people stuff to do) but I'd be happy to link to your repo that contained the solution instead :+1:
Also there's a slight misunderstanding in your solution. From the looks of yours, you're getting a list of all extensions in the current directory whereas the program I had in mind was more atomic in operation.
i.e.
extension some-file.php
returns
php
It only works on a single file at a time
You can use -print0
on the find
command to make the paths delimited by a null char (since a filename cannot have a null char in it) which might help resolve the first issue.
… which destroys greppability, at first, because I didn't know that grep, too, has a -z
option that, according to the man page, DoesTheRightThing™.
Anyway, I'm not going to write a script for this because it WorksForMe, so I'll close this PR.
Technicalities:
Btw, there's a command-line tool called
pwgen
, so if you were trying to generate a password or something, just do: