This is not very smart, but might do the trick:
Code:
#!/bin/sh
if [ -z $1 ]; then
echo "Needs filename as argument."
exit 1
elif [ -f "$1" ]; then
fname="$1"
fi
while read a;
do
echo "$a" | sed -e "s+http://++" -e "s+@.*$++g"
done < "$fname"
* Save this as a shell script of a name you like, e.g. url-extract.sh
* Make it executable with
chmod +x url-extract.sh
* Give your filename as the first argument:
url-extract.sh filename_that_is_to_big_to_edit_by_hand.txt
and it returns only user
ass as you wanted