Portál AbcLinuxu, 12. května 2025 11:20
top b -n 2 | grep "CPU state" tail -1 | awk '{print substr($9,1,2)}'
echo 0
ale to mi vypisuje chybu:
./get_cpu.sh
grep: tail: není souborem ani adresářem
0
Dekuji za Vasi pomoc
top -n 1 | grep "Cpu" | awk '{print $2}' | cut -d '%' -f 1
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
top -n 1 | awk '/Cpu/{print $2}' | cut -d '%' -f 1
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.