Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Sistemi operativi I > [LAB] Esercizi di Shell
Pages (2): « 1 [2]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
gq690051
.simpatizzante.

User info:
Registered: Jun 2008
Posts: 19 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 3:41:06: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

grep - cerca un file per linee contenente un dato pattern

Opzioni
-e : -e pattern è lo stesso pattern (tradotto da man di minix)
-c : conta quante volte ricorre il pattern nella linea
-i : ignora caso
-l : stampa il nome del file che contiene il pattern
-n : stampa il numero di linee
-s : solo lo stato, non stampare l'output
-v : seleziona i file che non contengono il pattern*


*ammetto che è una mia interpretazione in quanto dal man di minix si legge "select line that do not match". ho provato a fare un esercizio in cui cercavo i file che non contenevano la parola "login" usando il comando grep -lv "login" e la lista di file è molto più lunga rispetto a quella in cui la condizione v non c'è. da questo deduco che sia così. se qualcuno vuole obbiettare in merito, per il bene di tutti lo faccia!

15-01-2009 15:25
Click Here to See the Profile for gq690051 Click here to Send gq690051 a Private Message Find more posts by gq690051 Add gq690051 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Smy
.fedelissimo.

User info:
Registered: Jun 2007
Posts: 47 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 0:05:16 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Si esatto dovrebbe essere così. Infatti nell'esempio prima il comando era:
grep -v ^# programma
cioè trova nel file programma tutte le linee che non iniziano per #.
Spero di aver capito bene!

15-01-2009 15:49
Click Here to See the Profile for Smy Click here to Send Smy a Private Message Find more posts by Smy Add Smy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 02:08.    Post New Thread    Post A Reply
Pages (2): « 1 [2]   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.056 seconds (60.86% PHP - 39.14% MySQL) con 28 query.