[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [MISC] `find`-fiduser (Was: Virus bon appetit)



Thorbjørn Ravn Andersen <sslug@sslug> wrote on 10-Jun-01:

> Anders Melchiorsen wrote:
> 
> >  find / -type f -exec egrep -i 'sslug@sslug' {} \; | tr ' ' '\n' | tr '"' '\n' |
> >  tr "'" '\n' | egrep -i 'sslug@sslug' |
> >  sort -u > ~/adr; cat /tmp/brev | mail `head -n 1000 ~/adr`
> > 
> > Noget må kunne forbedres. Om ikke andet er "cat" kaldet overflødigt.

[...]

> Herudover mener jeg at huske at tr tager længere strenge end som så; og
> at de tre udgaver derfor kan slåes sammen til èn:

Du fik ikke den modificerede udgave med. Jeg har forsøgt mig med dine
og lidt yderligere ændringer. Jeg har flyttet head hen før sort, så
der rammes bredere (men så ikke nøjagtig 1000) og søgningen afsluttes
når der haves nok adresser. Jeg har ændret det regulære udtryk, så det
matcher lidt andre, nok mere korrekte, adresser. Desuden er den
midlertidige fil, ~/adr, fjernet:

mail </tmp/brev `find / -type f | xargs grep @ | tr \ \"\' '\n' |
egrep '^(\w+[-.]?)+@(\w+[-.]?)+$' | head -n 1000 | sort -u`


Den kører på min Linux, men er sikkert blevet afhængig af bash2
og/eller GNU's grep?



-Anders.

-- 
ECHO FORMAT C: /U /V:C


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:23 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *