$ inxi -xxxw
Weather: Conditions: 23 F (-5 C) - Scattered Clouds Wind: From the West at 15 MPH Humidity: 53%
Pressure: 29.89 in (1012 mb) Wind Chill: 10 F (-12 C)
Location: Chicago IL (USA) Altitude: 184 ft
Time: November 17, 11:25 AM CST (America/Chicago) Observation Time: November 17, 10:53 AM CST
1)以上是当地天气的终端命令。
$ inxi -xxxw | sed 's/Co/\nCo/;s/Wind:/\nWind:/;s/Hu/\nHu/;s/Pr/\nPr/;s/Wind Chill/\nWind Chill/;s/Loc/\nLoc/;s/Al/\nAl/;s/Time:/\nTime:/;s/Ob/\nOb/'|sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g'|sed '/^[ \t]/d'
Weather:
Conditions: 23 F (-5 C) - Scattered Clouds
Wind: From the West at 15 MPH
Humidity: 53%
Pressure: 29.89 in (1012 mb)
Wind Chill: 10 F (-12 C)
Location: Chicago IL (USA)
Altitude: 184 ft
Time: November 17, 11:31 AM CST (America/Chicago)
Observation Time: November 17, 10:53 AM CST
2)以上是在conky中垂直显示的sed命令。
12Weather: 12
Conditions 28 F (-2 C) - Mostly Cloudy 12Wind From the WNW at 14 MPH 12
Humidity 69%
12 12
Pressure 29.94 in (1014 mb) 12
Wind Chill 17 F (-8 C)
3)以上是垂直显示命令(2)在conky.conf文件中运行的结果。
问题是我如何让 (3) 看起来像 (2) ?只是无法在这里获得相关信息。