EnderUNIX Team.


EnderUNIX İpucu

Arkadaşıma gönder , Ana Sayfa

[ Konsol ]

"grep ciktilarinda satir numaralarinin goruntulenmesi" - Bâkır EMRE - (2006-07-14 14:48:33)   [3130]

grep ile bir yada daha fazla dosya icerisinde arama yapabilirsiniz aradiginiz kelime yada cumlenin kacinci satirsa oldugunu ogrenmek icin grep'e --line-number yada -n parametresini ekleyebilirsiniz.cikti formati dosyaadi:kacincisatirda seklindedir
ornegin

[root@emre /usr/src/sys/contrib/altq/altq]# grep "CBQ_MAX_CLASSES" * --line-number --colour
altq_cbq.c:121: for (i = 0; i < CBQ_MAX_CLASSES; i++)
altq_cbq.c:149: i = chandle % CBQ_MAX_CLASSES;
altq_cbq.c:153: for (i = 0; i < CBQ_MAX_CLASSES; i++)
altq_cbq.c:174: for (i = 0; i < CBQ_MAX_CLASSES; i++) {
altq_cbq.c:331: i = a->qid % CBQ_MAX_CLASSES;
altq_cbq.c:333: for (i = 0; i < CBQ_MAX_CLASSES; i++)
altq_cbq.c:336: if (i == CBQ_MAX_CLASSES)
altq_cbq.c:445: for (i = 0; i < CBQ_MAX_CLASSES; i++)
altq_cbq.c:613: for (i = 0; i < CBQ_MAX_CLASSES; i++)
altq_cbq.c:732: for (i = 1; i < CBQ_MAX_CLASSES; i++)
altq_cbq.c:735: if (i == CBQ_MAX_CLASSES)
altq_cbq.c:896: for (n = 0, i = 0; n < nclasses && i < CBQ_MAX_CLASSES; n++, i++) {
altq_cbq.c:898: if (++i >= CBQ_MAX_CLASSES)
altq_cbq.h:189:#define CBQ_MAX_CLASSES 256
altq_cbq.h:206: struct rm_class *cbq_class_tbl[CBQ_MAX_CLASSES];

ayrica --colour parametresiyle sonuclar renkli olarak gelecektir

Arkadaşıma gönder , Ana Sayfa