Poster une réponse à un sujet: [bash]Concours de script du jour
Attention, ce sujet est un sujet ancien (6545 jours sans réponse)
Gras [b]Texte[/b] Italique [i]Italique[/i] Souligné [u]Souligné[/u] Barré [strike]Barré[/strike]
Courriel [email=nobody@nobody.org]Nom[/email] Lien [url=http://www.website.com]Texte[/url] Ancre [anchor]Nom[/anchor] Image [img]http://www.website.com/image.jpg[/img] Insérer une image en provenance du site
Aligné à gauche [align=left]Texte[/align] Centré [align=center]Texte[/align] Aligné à droite [align=right]Texte[/align] Toute la largeur [align=justify]Texte[/text]
Couleur [color=#000000]Text[/color] Mise en forme [highlight=pascal]Texte[/highlight] Widgets Emoticons :code: [:code] Convertisseur HTML vers BBCode Convertisseur Word vers BBCode
Prévisualisation Vérification de l'orthographe

Copier Coller Couper Tout sélectionner
Tout effacer Insérer la date Insérer l'heure Insérer la date et heure Insérer votre IP
Liste [list=square][item]BlaBla[/item][/list] Liste Numérotée [list=decimal][item]BlaBla[/item][/list]
Citation [quote=name]Texte[/quote] Spoiler [spoiler]James est le meurtrier![/spoiler]
Tout en majuscules [uppercase]Texte[/uppercase] Tout en minuscules [lowercase]Texte[/lowercase] l33t [l33t]Je suis un nerd[/l33t] Texte en indice [sub]Texte[/sub] Texte en exposant [sup]Texte[/sup] Taille du texte [size=8]Texte[/size]
 
ovh
Un collègue à toi phil ? :petrus:
etik
:fou_crashburn: burned by philfr...
philfr
Ah, quand-même ! :wink:

etik
J'utilise ca, non non je ne spam pas non plus :lol: tu peux rajouter un uniq si necessaire.

tr ',;<>()"\47 ' '[\n*]' | sed -n -e 's/mailto://g' -e '/@/p'
blietaer
MERCIIIIIIIIIIIIIIIIIIIIIIiii !!!!!
philfr

sed -n '/mailto:[A-Za-z0-9._%-]\+@[A-Za-z0-9.-]\+\.[A-Za-z]\{2,4\}/ s/.*mailto:\([A-Za-z0-9._%-]\+@[A-Za-z0-9.-]\+\.[A-Za-z]\{2,4\}\).*/\1/ p'


Sur ton fichier, ça donne:

info@spacebel.be
info@spacebel.be
info@spacebel.com
ingrid.leonard@spacebel.be
info_jobs@spacebel.com
info_jobs@spacebel.com
luc.halbach@spacebel.be
info_space@spacebel.com
info_dvc@spacebel.com
info@spacebel.com
ingrid.leonard@spacebel.be
info_jobs@spacebel.com
info_jobs@spacebel.com
info@spacebel.be
info@spacebel.be
luc.halbach@spacebel.be
info_space@spacebel.com
luc.halbach@spacebel.be
info_space@spacebel.com
info_dvc@spacebel.com
info@spacebel.com
ingrid.leonard@spacebel.be
info_jobs@spacebel.com
info_jobs@spacebel.com
info@spacebel.be
info@spacebel.be
info@spacebel.be
info@spacebel.be
info@spacebel.com
ingrid.leonard@spacebel.be
info_jobs@spacebel.com
info_jobs@spacebel.com
luc.halbach@spacebel.be
info_space@spacebel.com
info_dvc@spacebel.com
info@spacebel.com
ingrid.leonard@spacebel.be
info_jobs@spacebel.com
info_jobs@spacebel.com
info@spacebel.be
info@spacebel.be
luc.halbach@spacebel.be
info_space@spacebel.com
luc.halbach@spacebel.be
info_space@spacebel.com
info_dvc@spacebel.com
info@spacebel.com
ingrid.leonard@spacebel.be
info_jobs@spacebel.com
info_jobs@spacebel.com
info@spacebel.be
info@spacebel.be


Si tu pipe ça dans sort puis uniq, il reste

info@spacebel.be
info@spacebel.com
info_dvc@spacebel.com
info_jobs@spacebel.com
info_space@spacebel.com
ingrid.leonard@spacebel.be
luc.halbach@spacebel.be


:oh:
blietaer
oui oui grep fait cela, mais grep a un défaut : il renvoit TOUTE la ligne...et en html elle peut être kilométrique, bref on se retrouve quasi avec le fichier de départ.
ovh
Ah ben oué grep gère les regexp aussi svrai ça :oh:
Et bon html est un sous-ensemble du xml +/- donc ça va :joce:
blietaer
Ah? moi je pensais que vous alliez me sortir un truc à la grep | sed | cut | sort | uniq | wc en deux coups de cuillères...
C'est que je ne me représente pas l'ampleur de la tâche :figti:

mmmh pas vraiment sur une ligne.

Voici un copié-collé...déjà compacté.

PARDON-WARNING ! je voulais dire HTML bien sur et pas XML...



#grep -rni "@" /monrepertoire > out
#cat out
<img src="Info_ContactAngleur-2.gif" width="388" height="133" border="1" usemap="#Map2Map"><map name="Map2Map"><area shape="rect" coords="0,-2,214,138" href="Co_InfoAngleur-2.html" alt="How to reach Spacebel Angleur?" title="How to reach Spacebel Angleur?"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"></map>
www.spacebel.be/o:2:./En/General/Co_Info-2.html:75: <p align="center"><font size="2" face="Arial, Helvetica, sans-serif" color="#333399"><a href="#"><img src="Info_ContactHoeilaart-2.gif" width="388" height="133" border="1" usemap="#Map2"><map name="Map2"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"><area shape="rect" coords="1,-2,215,138" href="Co_InfoHoeilaart-2.html" alt="How to reach Spacebel Hoeilaart?" title="How to reach Spacebel Hoeilaart?"></map></a>
www.spacebel.be/o:3:./En/General/Co_Contact-2.html:100: <img src="../../IcoMouse.gif"> <a href="mailto:info@spacebel.com"><font color="FFFFFF">info@spacebel.com</font></a>
www.spacebel.be/o:4:./En/General/Co_Contact-2.html:112: <img src="Co_Contact.gif" width="273" height="188" usemap="#Map2" border="1"><map name="Map2"><area shape="rect" coords="76,158,235,192" href="mailto:ingrid.leonard@spacebel.be"></map></font></p--->
www.spacebel.be/o:5:./En/General/Co_Jobs-2.html:117: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-be@spacebel.com</font></a>
www.spacebel.be/o:6:./En/General/Co_Jobs-2.html:168: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-fr@spacebel.com</font></a></font>
www.spacebel.be/o:7:./en/Space/Sp_Contact.html:76: <img src="Sp_contact.gif" border=1 usemap="#Map2"><map name="Map2"><area shape="rect" coords="92,188,221,203" href="mailto:luc.halbach@spacebel.be"></map>
www.spacebel.be/o:8:./en/Space/Sp_Contact.html:96: <img src="../../IcoMouse.gif"> <a href="mailto:info_space@spacebel.com"><font color="FFFFFF">info_space@spacebel.com</font></a>
www.spacebel.be/o:9:./en/Environment/En_Contact.html:92: <img src="../../IcoMouse.gif"> <a href="mailto:info_dvc@spacebel.com"><font color="FFFFFF">info_dvc@spacebel.com</font></a>
www.spacebel.be/o:10:./en/General/Co_Contact.html:100: <img src="../../IcoMouse.gif"> <a href="mailto:info@spacebel.com"><font color="FFFFFF">info@spacebel.com</font></a>
www.spacebel.be/o:11:./en/General/Co_Contact.html:112: <img src="Co_Contact.gif" width="273" height="188" usemap="#Map2" border="1"><map name="Map2"><area shape="rect" coords="76,158,235,192" href="mailto:ingrid.leonard@spacebel.be"></map></font></p--->
www.spacebel.be/o:12:./en/General/Co_Jobs.html:117: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-be@spacebel.com</font></a>
www.spacebel.be/o:13:./en/General/Co_Jobs.html:168: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-fr@spacebel.com</font></a></font>
www.spacebel.be/o:14:./en/General/Co_Info.html:73: <img src="Info_ContactAngleur.gif" width="388" height="133" border="1" usemap="#Map2Map"><map name="Map2Map"><area shape="rect" coords="0,-2,214,138" href="Co_InfoAngleur.html" alt="How to reach Spacebel Angleur?" title="How to reach Spacebel Angleur?"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"></map>
www.spacebel.be/o:15:./en/General/Co_Info.html:75: <p align="center"><font size="2" face="Arial, Helvetica, sans-serif" color="#333399"><a href="#"><img src="Info_ContactHoeilaart.gif" width="388" height="133" border="1" usemap="#Map2"><map name="Map2"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"><area shape="rect" coords="1,-2,215,138" href="Co_InfoHoeilaart.html" alt="How to reach Spacebel Hoeilaart?" title="How to reach Spacebel Hoeilaart?"></map></a>
www.spacebel.be/o:16:./fr/Space/Sp_Contact.html:76: <img src="Sp_contact.gif" border=1 usemap="#Map2"><map name="Map2"><area shape="rect" coords="92,188,221,203" href="mailto:luc.halbach@spacebel.be"></map>
www.spacebel.be/o:17:./fr/Space/Sp_Contact.html:96: <img src="../../IcoMouse.gif"> <a href="mailto:info_space@spacebel.com"><font color="FFFFFF">info_space@spacebel.com</font></a>
www.spacebel.be/o:18:./fr/space/Sp_Contact-2.html:76: <img src="Sp_contact.gif" border=1 usemap="#Map2"><map name="Map2"><area shape="rect" coords="92,188,221,203" href="mailto:luc.halbach@spacebel.be"></map>
www.spacebel.be/o:19:./fr/space/Sp_Contact-2.html:96: <img src="../../IcoMouse.gif"> <a href="mailto:info_space@spacebel.com"><font color="FFFFFF">info_space@spacebel.com</font></a>
www.spacebel.be/o:20:./fr/Environment/En_Contact.html:92: <img src="../../IcoMouse.gif"> <a href="mailto:info_dvc@spacebel.com"><font color="FFFFFF">info_dvc@spacebel.com</font></a>
www.spacebel.be/o:21:./fr/General/Co_Contact.html:100: <img src="../../IcoMouse.gif"> <a href="mailto:info@spacebel.com"><font color="FFFFFF">info@spacebel.com</font></a>
www.spacebel.be/o:22:./fr/General/Co_Contact.html:112: <img src="Co_Contact.gif" width="273" height="188" usemap="#Map2" border="1"><map name="Map2"><area shape="rect" coords="76,158,235,192" href="mailto:ingrid.leonard@spacebel.be"></map></font></p--->
www.spacebel.be/o:23:./fr/General/Co_Jobs.html:115: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-be@spacebel.com</font></a>
www.spacebel.be/o:24:./fr/General/Co_Jobs.html:164: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-fr@spacebel.com</font></a></font>
www.spacebel.be/o:25:./fr/General/Co_Info.html:73: <img src="Info_ContactAngleur.gif" width="388" height="133" border="1" usemap="#Map2Map"><map name="Map2Map"><area shape="rect" coords="0,-2,214,138" href="Co_InfoAngleur.html" alt="How to reach Spacebel Angleur?" title="How to reach Spacebel Angleur?"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"></map>
www.spacebel.be/o:26:./fr/General/Co_Info.html:75: <p align="center"><font size="2" face="Arial, Helvetica, sans-serif" color="#333399"><a href="#"><img src="Info_ContactHoeilaart.gif" width="388" height="133" border="1" usemap="#Map2"><map name="Map2"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"><area shape="rect" coords="1,-2,215,138" href="Co_InfoHoeilaart.html" alt="How to reach Spacebel Hoeilaart?" title="How to reach Spacebel Hoeilaart?"></map></a>
Fichier binaire www.spacebel.be/En/General/Tableau Affiliated-2.png concorde
www.spacebel.be/En/General/Co_Info-2.html:73: <img src="Info_ContactAngleur-2.gif" width="388" height="133" border="1" usemap="#Map2Map"><map name="Map2Map"><area shape="rect" coords="0,-2,214,138" href="Co_InfoAngleur-2.html" alt="How to reach Spacebel Angleur?" title="How to reach Spacebel Angleur?"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"></map>
www.spacebel.be/En/General/Co_Info-2.html:75: <p align="center"><font size="2" face="Arial, Helvetica, sans-serif" color="#333399"><a href="#"><img src="Info_ContactHoeilaart-2.gif" width="388" height="133" border="1" usemap="#Map2"><map name="Map2"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"><area shape="rect" coords="1,-2,215,138" href="Co_InfoHoeilaart-2.html" alt="How to reach Spacebel Hoeilaart?" title="How to reach Spacebel Hoeilaart?"></map></a>
Fichier binaire www.spacebel.be/En/General/Tableau Business-2.png concorde
www.spacebel.be/En/General/Co_Contact-2.html:100: <img src="../../IcoMouse.gif"> <a href="mailto:info@spacebel.com"><font color="FFFFFF">info@spacebel.com</font></a>
www.spacebel.be/En/General/Co_Contact-2.html:112: <img src="Co_Contact.gif" width="273" height="188" usemap="#Map2" border="1"><map name="Map2"><area shape="rect" coords="76,158,235,192" href="mailto:ingrid.leonard@spacebel.be"></map></font></p--->
www.spacebel.be/En/General/Co_Jobs-2.html:117: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-be@spacebel.com</font></a>
www.spacebel.be/En/General/Co_Jobs-2.html:168: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-fr@spacebel.com</font></a></font>
www.spacebel.be/en/Space/Sp_Contact.html:76: <img src="Sp_contact.gif" border=1 usemap="#Map2"><map name="Map2"><area shape="rect" coords="92,188,221,203" href="mailto:luc.halbach@spacebel.be"></map>
www.spacebel.be/en/Space/Sp_Contact.html:96: <img src="../../IcoMouse.gif"> <a href="mailto:info_space@spacebel.com"><font color="FFFFFF">info_space@spacebel.com</font></a>
Fichier binaire www.spacebel.be/en/space/frescodsp_files/DSP_TS_DISTRIB.zip concorde
Fichier binaire www.spacebel.be/en/space/frescodsp_files/ADSP_GCC_SUN_v5_0.tar.gz concorde
Fichier binaire www.spacebel.be/en/space/frescodsp_files/ADSP_GCC_NT_CYG_v50.zip concorde
www.spacebel.be/en/Environment/En_Contact.html:92: <img src="../../IcoMouse.gif"> <a href="mailto:info_dvc@spacebel.com"><font color="FFFFFF">info_dvc@spacebel.com</font></a>
www.spacebel.be/en/General/Co_Contact.html:100: <img src="../../IcoMouse.gif"> <a href="mailto:info@spacebel.com"><font color="FFFFFF">info@spacebel.com</font></a>
www.spacebel.be/en/General/Co_Contact.html:112: <img src="Co_Contact.gif" width="273" height="188" usemap="#Map2" border="1"><map name="Map2"><area shape="rect" coords="76,158,235,192" href="mailto:ingrid.leonard@spacebel.be"></map></font></p--->
Fichier binaire www.spacebel.be/en/General/Tableau Affiliated.png concorde
Fichier binaire www.spacebel.be/en/General/Tableau Business.png concorde
www.spacebel.be/en/General/Co_Jobs.html:117: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-be@spacebel.com</font></a>
www.spacebel.be/en/General/Co_Jobs.html:168: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-fr@spacebel.com</font></a></font>
www.spacebel.be/en/General/Co_Info.html:73: <img src="Info_ContactAngleur.gif" width="388" height="133" border="1" usemap="#Map2Map"><map name="Map2Map"><area shape="rect" coords="0,-2,214,138" href="Co_InfoAngleur.html" alt="How to reach Spacebel Angleur?" title="How to reach Spacebel Angleur?"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"></map>
www.spacebel.be/en/General/Co_Info.html:75: <p align="center"><font size="2" face="Arial, Helvetica, sans-serif" color="#333399"><a href="#"><img src="Info_ContactHoeilaart.gif" width="388" height="133" border="1" usemap="#Map2"><map name="Map2"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"><area shape="rect" coords="1,-2,215,138" href="Co_InfoHoeilaart.html" alt="How to reach Spacebel Hoeilaart?" title="How to reach Spacebel Hoeilaart?"></map></a>
www.spacebel.be/fr/Space/Sp_Contact.html:76: <img src="Sp_contact.gif" border=1 usemap="#Map2"><map name="Map2"><area shape="rect" coords="92,188,221,203" href="mailto:luc.halbach@spacebel.be"></map>
www.spacebel.be/fr/Space/Sp_Contact.html:96: <img src="../../IcoMouse.gif"> <a href="mailto:info_space@spacebel.com"><font color="FFFFFF">info_space@spacebel.com</font></a>
www.spacebel.be/fr/space/Sp_Contact-2.html:76: <img src="Sp_contact.gif" border=1 usemap="#Map2"><map name="Map2"><area shape="rect" coords="92,188,221,203" href="mailto:luc.halbach@spacebel.be"></map>
www.spacebel.be/fr/space/Sp_Contact-2.html:96: <img src="../../IcoMouse.gif"> <a href="mailto:info_space@spacebel.com"><font color="FFFFFF">info_space@spacebel.com</font></a>
www.spacebel.be/fr/Environment/En_Contact.html:92: <img src="../../IcoMouse.gif"> <a href="mailto:info_dvc@spacebel.com"><font color="FFFFFF">info_dvc@spacebel.com</font></a>
www.spacebel.be/fr/General/Co_Contact.html:100: <img src="../../IcoMouse.gif"> <a href="mailto:info@spacebel.com"><font color="FFFFFF">info@spacebel.com</font></a>
www.spacebel.be/fr/General/Co_Contact.html:112: <img src="Co_Contact.gif" width="273" height="188" usemap="#Map2" border="1"><map name="Map2"><area shape="rect" coords="76,158,235,192" href="mailto:ingrid.leonard@spacebel.be"></map></font></p--->
Fichier binaire www.spacebel.be/fr/General/Tableau Affiliated.png concorde
Fichier binaire www.spacebel.be/fr/General/Tableau Business.png concorde
www.spacebel.be/fr/General/Co_Jobs.html:115: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-be@spacebel.com</font></a>
www.spacebel.be/fr/General/Co_Jobs.html:164: <img src="../../IcoMouse.gif"> <a href="mailto:info_jobs@spacebel.com"><font color="FFFFFF">info_jobs-fr@spacebel.com</font></a></font>
www.spacebel.be/fr/General/Co_Info.html:73: <img src="Info_ContactAngleur.gif" width="388" height="133" border="1" usemap="#Map2Map"><map name="Map2Map"><area shape="rect" coords="0,-2,214,138" href="Co_InfoAngleur.html" alt="How to reach Spacebel Angleur?" title="How to reach Spacebel Angleur?"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"></map>
www.spacebel.be/fr/General/Co_Info.html:75: <p align="center"><font size="2" face="Arial, Helvetica, sans-serif" color="#333399"><a href="#"><img src="Info_ContactHoeilaart.gif" width="388" height="133" border="1" usemap="#Map2"><map name="Map2"><area shape="rect" coords="232,116,372,132" href="mailto:info@spacebel.be" alt="e-mail" title="e-mail"><area shape="rect" coords="1,-2,215,138" href="Co_InfoHoeilaart.html" alt="How to reach Spacebel Hoeilaart?" title="How to reach Spacebel Hoeilaart?"></map></a>

philfr
Genre

grep -i 'mailto:[A-Z0-9._%-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}' *.xml
Catégorie:  






Ada
CSS
Cobol
CPP
HTML
Fortran
Java
JavaScript
Pascal
Perl
PHP
Python
SQL
VB
XML
Anon URL
DailyMotion
eBay
Flickr
FLV
Google Video
Google Maps
Metacafe
MP3
SeeqPod
Veoh
Yahoo Video
YouTube
6px
8px
10px
12px
14px
16px
18px
Informaticien.be - © 2002-2024 AkretioSPRL  - Generated via Kelare
The Akretio Network: Akretio - Freedelity - KelCommerce - Votre publicité sur informaticien.be ?