-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternate for Perl? #33
Comments
Is there any movement on this one ? , it's normally taken for granted Perl will be on the system, but that is not always the case in controlled environments. |
Do you have a preference on approach? |
I prefer sed. I threw this together briefly, obviously this is just showing for http url:
Output: As for line https://github.com/hipchat/hipchat-cli/blob/master/hipchat_room_message#L110 http://sfyang-en.blogspot.co.uk/2012/04/url-encodingdecoding-with-shell-script.html |
It has been over a month any movement on this one ? |
If we don't use perl, is it ok to take for granted that AWK or SED might be in the system? I believe it's equally possible to have either of those in the system, but happy to review and accept a PR with the reasoning behind though. |
sounds reasonable also you could do a pre-req and check that the command(s) are there before the tool can be used. |
There is some processing/cleanup done using Perl. However, there are cases where Perl might not be available. Is there a SED or AWK alternative for the use of Perl?
Example:
perl -p -e "s/(?<!href=\"|href=')((?:https?|ftp|mailto)\:\/\/[^ \n]*)/\<a href=\"\1\"\>\1\<\/a>/g")
The text was updated successfully, but these errors were encountered: