aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-08-20 14:05:08 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-08-20 14:05:08 +0200
commita04beb5ea91ceac2d6a06f344527ed4d1c8e6fd0 (patch)
tree63dbaa20ebcd81b5add3699794daed0bede2aa0e
parentff99a09b4721f41da8a084b9717a05ba3b785067 (diff)
downloadscripts-a04beb5ea91ceac2d6a06f344527ed4d1c8e6fd0.tar.gz
scripts-a04beb5ea91ceac2d6a06f344527ed4d1c8e6fd0.zip
Removed useless comment, added ftp to urlgrep
Diffstat (limited to '')
-rwxr-xr-xurlgrep8
1 files changed, 2 insertions, 6 deletions
diff --git a/urlgrep b/urlgrep
index 665f19a..49afac6 100755
--- a/urlgrep
+++ b/urlgrep
@@ -1,12 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# Find all url in stdin, print them newline-separated to stdout 3# Find all URLs in stdin, print them newline-separated to stdout
4 4
5# Old regex (PCRE), kept it for later review: 5protocols='http|https|ftp|sftp|gemini|mailto'
6# reg='(((http|https|ftp)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]'
7# grep -Po "$reg"
8
9protocols='http|https|ftp|gemini|mailto'
10valid_chars="][a-zA-Z0-9_~/?#@!$&'()*+=.,;:-" 6valid_chars="][a-zA-Z0-9_~/?#@!$&'()*+=.,;:-"
11regex="(($protocols):|www\.)[$valid_chars]+" 7regex="(($protocols):|www\.)[$valid_chars]+"
12 8

Generated with cgit - Back to sebastiano.tronto.net