scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit a04beb5ea91ceac2d6a06f344527ed4d1c8e6fd0
parent ff99a09b4721f41da8a084b9717a05ba3b785067
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sun, 20 Aug 2023 14:05:08 +0200

Removed useless comment, added ftp to urlgrep

Diffstat:
Murlgrep | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/urlgrep b/urlgrep @@ -1,12 +1,8 @@ #!/bin/sh -# Find all url in stdin, print them newline-separated to stdout +# Find all URLs in stdin, print them newline-separated to stdout -# Old regex (PCRE), kept it for later review: -# reg='(((http|https|ftp)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]' -# grep -Po "$reg" - -protocols='http|https|ftp|gemini|mailto' +protocols='http|https|ftp|sftp|gemini|mailto' valid_chars="][a-zA-Z0-9_~/?#@!$&'()*+=.,;:-" regex="(($protocols):|www\.)[$valid_chars]+"