91
Software / Re: Použití if v bashi
« kdy: 17. 04. 2011, 08:39:50 »Kód: [Vybrat]
if [ "$VAR" = "AHOJ" ]; then
echo "ahoj"
fi
if egrep -q "^root:" /etc/passwd; then
echo "root user exists in passwd file"
fi
Tato sekce Vám umožňuje zobrazit všechny příspěvky tohoto uživatele. Prosím uvědomte si, že můžete vidět příspěvky pouze z oblastí Vám přístupných.
if [ "$VAR" = "AHOJ" ]; then
echo "ahoj"
fi
if egrep -q "^root:" /etc/passwd; then
echo "root user exists in passwd file"
fi
#!/bin/bash
find -regextype posix-egrep -iregex ".*[.](avi|mkv|mp4|wmv|divx|mpg|mpeg)" \
-exec sh $HOME/Dokumenty/ScriptyBASH/vcs-1.12.2.sh -n 21 -c 3 -H160 '{}' \;
For single-CPU systems that are CPU-bound, one can think of load average as a percentage of system utilization during the respective time period. For systems with multiple CPUs, one must divide the number by the number of processors in order to get a comparable percentage.