Help request: Shell Script to extract URLS from text?

Hi everyone,

I am an advanced newb at applescript.

Someone here was kind enough to help me make an automator workflow that extracts emails from text. It’s setup as follows

Set value of variable (to path)

Run Shell script (bin/bash)

for f in “$@”
grep -Eiorh ‘([[:alnum:].]+@[[:alnum:]]+?.[[:alpha:].]{2,6})’ “$@” | sort | uniq

Set contents of text edit document

Wondering if anyone can be so kind as to help me do the same sort of thing but to extract http:// and www. from text?

I honestly have no clue when it comes to shell scripting so any help for the inept will be greatly appreciated!

Thank you!

Can anyone help me please?