tiny cleanup, dumped a sed and use bash parameter expansion instead.

This commit is contained in:
inxi-svn 2014-04-25 03:04:36 +00:00
parent 2826619b05
commit 788ca63f98

5
inxi
View file

@ -5637,7 +5637,6 @@ get_hard_drive_data_advanced()
# get rid of whitespace for some drive names and ids, and extra data after - in name # get rid of whitespace for some drive names and ids, and extra data after - in name
temp_name=$( cut -d '-' -f 1 <<< ${a_temp_scsi[$j]// /_} ) temp_name=$( cut -d '-' -f 1 <<< ${a_temp_scsi[$j]// /_} )
sd_ls_by_id=$( grep -Em1 ".*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" ) sd_ls_by_id=$( grep -Em1 ".*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" )
if [[ -n $sd_ls_by_id ]];then if [[ -n $sd_ls_by_id ]];then
temp_name=${a_temp_scsi[$j]} temp_name=${a_temp_scsi[$j]}
break break
@ -11393,7 +11392,7 @@ print_repo_data()
# use bots that show page title for urls, so need to break the url by adding # use bots that show page title for urls, so need to break the url by adding
# a white space. # a white space.
if [[ $B_IRC == 'true' ]];then if [[ $B_IRC == 'true' ]];then
file_content=$( echo $file_content | sed 's|://|: //|' ) file_content=$( echo ${file_content/:\/\//: \/\/} )
else else
file_content=$( echo $file_content ) file_content=$( echo $file_content )
fi fi
@ -11759,7 +11758,7 @@ print_weather_data()
local weather_data='' location_string='' local_time='' time_string='' pressure='' local weather_data='' location_string='' local_time='' time_string='' pressure=''
local a_location='' a_weather='' weather_string='' weather='' temp='' winds='' humidity='' local a_location='' a_weather='' weather_string='' weather='' temp='' winds='' humidity=''
local time_zone='' observation_time='' city='' state='' country='' altitude='' local time_zone='' observation_time='' city='' state='' country='' altitude=''
local heat_index="" wind_chill='' dewpoint='' xxx_humidity='' local heat_index='' wind_chill='' dewpoint='' xxx_humidity=''
local openP='(' closeP=')' local openP='(' closeP=')'
if [[ $B_IRC == 'true' ]];then if [[ $B_IRC == 'true' ]];then