mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 10:02:18 +00:00
Added (x) numbering for each hard drive listed in > 1 verbosity levels, this is a nice improvement in readability
This commit is contained in:
parent
6ff09a06d5
commit
312a53e3b9
10
inxi
10
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.2.14
|
#### version: 0.2.15
|
||||||
#### Date: October 30 2008
|
#### Date: October 30 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||||
|
@ -46,7 +46,7 @@ CPU_MODEL=''
|
||||||
CPU_CLOCK=''
|
CPU_CLOCK=''
|
||||||
CPU_FLAGS=''
|
CPU_FLAGS=''
|
||||||
HDD_CAPACITY=''
|
HDD_CAPACITY=''
|
||||||
#HDD_MODEL='' ## note, can't declare this or it adds a comma in list of disks in get_hdd_data
|
HDD_MODEL='' ## note, can't declare this or it adds a comma in list of disks in get_hdd_data
|
||||||
HDD_USED=''
|
HDD_USED=''
|
||||||
IRC_CLIENT=''
|
IRC_CLIENT=''
|
||||||
IRC_CLIENT_VERSION=''
|
IRC_CLIENT_VERSION=''
|
||||||
|
@ -1066,6 +1066,7 @@ get_hard_drive_data()
|
||||||
{
|
{
|
||||||
local disk='' i='' hdd_cap2='' hdd_cap1='' disk_capacity='' a_total_hdd=''
|
local disk='' i='' hdd_cap2='' hdd_cap1='' disk_capacity='' a_total_hdd=''
|
||||||
|
|
||||||
|
i=1
|
||||||
for disk in /proc/ide/ide*/hd*
|
for disk in /proc/ide/ide*/hd*
|
||||||
do
|
do
|
||||||
if [[ -e $disk/media && $( remove_erroneous_chars $disk/media ) = disk ]];then
|
if [[ -e $disk/media && $( remove_erroneous_chars $disk/media ) = disk ]];then
|
||||||
|
@ -1075,7 +1076,8 @@ get_hard_drive_data()
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
(( disk_capacity+=$( remove_erroneous_chars $disk/capacity ) ))
|
(( disk_capacity+=$( remove_erroneous_chars $disk/capacity ) ))
|
||||||
HDD_MODEL="${HDD_MODEL}${HDD_MODEL+,}$( remove_erroneous_chars $disk/model )"
|
HDD_MODEL="${HDD_MODEL}${HDD_MODEL+ ${C1}($i)${C2}}$( remove_erroneous_chars $disk/model )"
|
||||||
|
((i++))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -1105,7 +1107,7 @@ get_hard_drive_data()
|
||||||
|
|
||||||
for (( i=0; i < ${#a_total_hdd[@]}; i++ ))
|
for (( i=0; i < ${#a_total_hdd[@]}; i++ ))
|
||||||
do
|
do
|
||||||
HDD_MODEL="${HDD_MODEL}${HDD_MODEL+,}${a_total_hdd[i]}"
|
HDD_MODEL="${HDD_MODEL}${HDD_MODEL+ ${C1}($(($i+1)))${C2}}${a_total_hdd[i]}"
|
||||||
done
|
done
|
||||||
if [ -z "$HDD_MODEL" ];then
|
if [ -z "$HDD_MODEL" ];then
|
||||||
HDD_MODEL='Non Detected'
|
HDD_MODEL='Non Detected'
|
||||||
|
|
Loading…
Reference in a new issue