mirror of
				https://github.com/librenms/librenms-agent.git
				synced 2024-05-09 09:54:52 +00:00 
			
		
		
		
	Strip all non-ASCII characters from hddtemp output (#136)
This commit is contained in:
		| @@ -32,7 +32,7 @@ if [ "${hddtemp}" != "" ]; then | ||||
| 		else | ||||
| 			output=`${hddtemp} -w -q ${disks} 2>/dev/null` | ||||
| 		fi | ||||
| 		content=`echo "$output" | awk -F": " 'BEGIN{ ORS="" }{ print "|"$1"|"$2"|"$3"|";} ' | sed 's/[° ]C|/|C|/g' | sed 's/[° ]F|/|F|/g'` | ||||
| 		content=`echo "$output" | awk -F": " 'BEGIN{ ORS="" }{ print "|"$1"|"$2"|"$3"|";} ' | sed 's/[° ]C|/|C|/g' | sed 's/[° ]F|/|F|/g' | tr -cd '\12\14\40-\176'` | ||||
| 		if [ "${content}" != "" ]; then | ||||
| 			echo '<<<hddtemp>>>' | ||||
| 			echo ${content} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user