Portál AbcLinuxu, 30. dubna 2024 02:43


Dotaz: grep

7.12.2011 17:07 marian34
grep
Přečteno: 569×
Odpovědět | Admin
Zdravim,môzte mi niekto vysvetlit preco sa tak deje?

...marian 25652 0.5 2.5 45648 13192 ? Rl 16:16 0:11 gnome-terminal marian 25653 0.0 0.1 1980 700 ? S 16:16 0:00 gnome-pty-helper marian 25654 0.0 0.6 4976 3256 pts/0 Ss 16:16 0:00 bash marian 26783 0.0 0.0 4376 324 ? Ss 16:23 0:00 /bin/osctest2 -c /home/marian/osctest2conf -b marian 26785 0.0 0.3 5320 1936 ? Sl 16:23 0:00 /bin/osctest2 -c /home/marian/osctest2conf -b marian 29247 0.0 0.2 2708 1020 pts/0 R+ 16:52 0:00 ps aux root 31266 0.0 1.5 44752 8108 ? S Nov07 0:00 kdeinit4: kio_file [kdeinit] file local:/home/ root 31270 0.0 3.6 77156 18416 ? S Nov07 0:53 kdeinit4: kwalletd [kdeinit] root 32102 0.0 0.0 0 0 ? S Nov05 0:03 [flush-8:0]

a po

marian@marian-laptop:~$ ps aux | grep -v grep | grep -c "osctest2"

2

osctest2 tam vidim styri...

Řešení dotazu:


Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

martin-ux avatar 7.12.2011 18:22 martin-ux | skóre: 18 | Bratislava
Rozbalit Rozbalit vše Re: grep
Odpovědět | | Sbalit | Link | Blokovat | Admin
mohol by si to pastnut este raz, ale v tagoch <pre></pre>
..when you do things right, people won't be sure you've done anything at all..
7.12.2011 18:30 marian34
Rozbalit Rozbalit vše Re: grep
marian 26783 0.0 0.0 4376 324 ? Ss 16:23 0:00 /bin/osctest2 -c /home/marian/osctest2conf -b

marian 26785 0.0 0.4 5556 2092 ? Sl 16:23 0:01 /bin/osctest2 -c /home/marian/osctest2conf -b
martin-ux avatar 7.12.2011 18:47 martin-ux | skóre: 18 | Bratislava
Rozbalit Rozbalit vše Re: grep
tak potom je tvoj output v poriadku. pozri man grep:
       -c, --count
              Suppress normal output; instead print a count of matching lines for each input file
matchuje pocet riadkov, nie vyskyt slov. neviem co chces dosiahnut, ale na pocitanie slov mozes pozuit (aj) wc(1).

..when you do things right, people won't be sure you've done anything at all..
7.12.2011 20:26 marian34
Rozbalit Rozbalit vše Re: grep
Ok,dik.

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.