forked from ungleich-public/cdist
cat
and pipe diet
This commit is contained in:
parent
c36fba4b99
commit
e727824964
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ case "$os" in
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if [ -r /proc/cpuinfo ]; then
|
if [ -r /proc/cpuinfo ]; then
|
||||||
cores="$(cat /proc/cpuinfo | grep "core id" | sort | uniq | wc -l)"
|
cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)"
|
||||||
if [ ${cores} -eq 0 ]; then
|
if [ ${cores} -eq 0 ]; then
|
||||||
cores="1"
|
cores="1"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -30,7 +30,7 @@ case "$os" in
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if [ -r /proc/cpuinfo ]; then
|
if [ -r /proc/cpuinfo ]; then
|
||||||
sockets="$(cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l)"
|
sockets="$(grep "physical id" /proc/cpuinfo | sort | uniq | wc -l)"
|
||||||
if [ ${sockets} -eq 0 ]; then
|
if [ ${sockets} -eq 0 ]; then
|
||||||
sockets="$(cat /proc/cpuinfo | grep "processor" | wc -l)"
|
sockets="$(cat /proc/cpuinfo | grep "processor" | wc -l)"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -31,7 +31,7 @@ case "$os" in
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if [ -r /proc/meminfo ]; then
|
if [ -r /proc/meminfo ]; then
|
||||||
echo "$(cat /proc/meminfo | grep "MemTotal:" | awk '{print $2}')"
|
echo "$(grep "MemTotal:" /proc/meminfo | awk '{print $2}')"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue