mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fixed a small glitch with sensors data, it needs a character string after the newlines for the
newline to work properly due to how bash deals with null lines after end of content.
This commit is contained in:
parent
0e805c7b23
commit
93a7e248d9
8
inxi
8
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.7.17
|
#### version: 1.7.18
|
||||||
#### Date: July 19 2011
|
#### Date: July 20 2011
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -5806,7 +5806,9 @@ get_sensors_output()
|
||||||
if [[ -n $sensors_path ]];then
|
if [[ -n $sensors_path ]];then
|
||||||
sensors_data="$( $sensors_path 2>/dev/null )"
|
sensors_data="$( $sensors_path 2>/dev/null )"
|
||||||
if [[ -n "$sensors_data" ]];then
|
if [[ -n "$sensors_data" ]];then
|
||||||
sensors_data="$sensors_data\n\n###" # make sure the file ends in newlines
|
# make sure the file ends in newlines then characters, the newlines are lost in the echo unless
|
||||||
|
# the data ends in some characters
|
||||||
|
sensors_data="$sensors_data\n\n###"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo -e "$sensors_data"
|
echo -e "$sensors_data"
|
||||||
|
|
Loading…
Reference in a new issue