mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
Some bash tweaks, tests on use of [ vs [[ brackets and arrays
This commit is contained in:
parent
11b4075dbf
commit
d4ffef12c8
4
inxi
4
inxi
|
@ -1297,7 +1297,7 @@ print_cpu_data()
|
||||||
cpu_data="$cpu_data${C2} ${a_cpu_working[2]} cache${C2} ${C1}flags${C2} ($CPU_FLAGS)${CN}"
|
cpu_data="$cpu_data${C2} ${a_cpu_working[2]} cache${C2} ${C1}flags${C2} ($CPU_FLAGS)${CN}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$VERBOSITY_LEVEL" -ge 5 -a ${#A_CPU_DATA[@]} -gt 2 ]
|
if [ "$VERBOSITY_LEVEL" -ge 5 -a "${#A_CPU_DATA[@]}" -gt 2 ]
|
||||||
then
|
then
|
||||||
cpu_clock_speed='' # null < verbosity level 5
|
cpu_clock_speed='' # null < verbosity level 5
|
||||||
else
|
else
|
||||||
|
@ -1307,7 +1307,7 @@ print_cpu_data()
|
||||||
cpu_data="$cpu_data $cpu_clock_speed"
|
cpu_data="$cpu_data $cpu_clock_speed"
|
||||||
print_screen_output "$cpu_data"
|
print_screen_output "$cpu_data"
|
||||||
|
|
||||||
if [ "$VERBOSITY_LEVEL" -ge 5 -a ${#A_CPU_DATA[@]} -gt 2 ]
|
if [ "$VERBOSITY_LEVEL" -ge 5 -a "${#A_CPU_DATA[@]}" -gt 2 ]
|
||||||
then
|
then
|
||||||
for (( i=0; i < ${#A_CPU_DATA[@]}-1; i++ ))
|
for (( i=0; i < ${#A_CPU_DATA[@]}-1; i++ ))
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in a new issue