Portál AbcLinuxu, 8. května 2025 02:03
...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
Řešení dotazu:
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
man grep
:
-c, --count Suppress normal output; instead print a count of matching lines for each input filematchuje pocet riadkov, nie vyskyt slov. neviem co chces dosiahnut, ale na pocitanie slov mozes pozuit (aj)
wc(1)
.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.