04/07/2010 - 16:15
- Блог пользователя administrator
- Комментировать
- 244800 reads
Метки: email адреса, Howto, shell script
Howto get Email addresses from file (shell script)
#! /bin/sh
# ##################################################
NAME_="emailadext"
HTML_="isolate email address"
PURPOSE_="extract email addresses from file or stdin"
SYNOPSIS_="$NAME_ [-hl] <file> [file...]"
REQUIRES_="standard GNU commands"
VERSION_="1.0"
DATE_="2004-06-24; last update: 2004-06-25"
AUTHOR_="Dawid Michalczyk <dm@eonworks.com>"
URL_="www.comp.eonworks.com"
CATEGORY_="www"
PLATFORM_="Linux"
SHELL_="bash"
DISTRIBUTE_="yes"
# ##################################################
# This program is distributed under the terms of the GNU General Public License
usage () {
echo >&2 "$NAME_ $VERSION_ - $PURPOSE_
Usage: $SYNOPSIS_
Requires: $REQUIRES_
Options:
-h, usage and options (this help)
-l, see this script"
exit 1
}
# options
case $1 in
-h) usage ;;
-l) more $0 ; exit 1 ;;
esac
# main
cat "$@" | { # so we can act as a filter
tr ',;<>()"\47 ' '[\n*]' | sed -n -e 's/mailto://gI' -e '/@/p'
}
# ##################################################
NAME_="emailadext"
HTML_="isolate email address"
PURPOSE_="extract email addresses from file or stdin"
SYNOPSIS_="$NAME_ [-hl] <file> [file...]"
REQUIRES_="standard GNU commands"
VERSION_="1.0"
DATE_="2004-06-24; last update: 2004-06-25"
AUTHOR_="Dawid Michalczyk <dm@eonworks.com>"
URL_="www.comp.eonworks.com"
CATEGORY_="www"
PLATFORM_="Linux"
SHELL_="bash"
DISTRIBUTE_="yes"
# ##################################################
# This program is distributed under the terms of the GNU General Public License
usage () {
echo >&2 "$NAME_ $VERSION_ - $PURPOSE_
Usage: $SYNOPSIS_
Requires: $REQUIRES_
Options:
-h, usage and options (this help)
-l, see this script"
exit 1
}
# options
case $1 in
-h) usage ;;
-l) more $0 ; exit 1 ;;
esac
# main
cat "$@" | { # so we can act as a filter
tr ',;<>()"\47 ' '[\n*]' | sed -n -e 's/mailto://gI' -e '/@/p'
}
оригинал http://www.comp.eonworks.com/scripts/isolate_email_address-20040624.html
Навигация
Tags in Метки
1C
1С Предприятие
apache
Asterisk
BIND
BSOD
Centos
citrix
email адреса
Exchange 2007
Exchange 2010
FreeBSD
FreeNAS
FreePBX
Howto
ipmi
iptables
mysql
openvpn
OTRS
OWA
pass. recovery
passgen
ports
RAID
rdp
repair
root
routing
sftp
shell script
SQL2005
ssh
sync
time sync
tone
tool
update
VMware
Win2008x64
Windows 7
Windows 2008
winscp
Установка
восстановление
заголовок Received
как сделать
обновление
поиск
порт
права доступа
резервная копия
Tags for Как достать email адреса из файла (shell script)
Поиск
Вход в систему
прикольная штука:)