@FulgerX2007

Как из консоли узнать диагональ дисплея?

Привет!
Как из консоли узнать диагональ дисплея?
Я нашел утилиту read-edid .
После команды :
get-edid | parse-edid
выдает ответ:
root@image-pc:/home/studi# get-edid | parse-edid
This is read-edid version 3.0.1. Prepare for some fun.
Attempting to use i2c interface
Looks like no busses have an EDID. Sorry!
Attempting to use the classical VBE interface

	Performing real mode VBE call
	Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
	Function supported
	Call successful

	VBE version 300
	VBE string at 0x11100 "Intel(R) VLV Mobile/Desktop Graphics Chipset Accelerated VGA BIOS"

VBE/DDC service about to be called
	Report DDC capabilities

	Performing real mode VBE call
	Interrupt 0x10 ax=0x4f15 bx=0x0 cx=0x0
	Function supported
	Call successful

	Monitor and video card combination does not support DDC1 transfers
	Monitor and video card combination does not support DDC2 transfers
	0 seconds per 128 byte EDID block transfer
	Screen is not blanked during DDC transfer

Reading next EDID block

VBE/DDC service about to be called
	Read EDID

	Performing real mode VBE call
	Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0
	Function supported
	Call successful

Checksum Correct

Section "Monitor"
	Identifier "�
                     @"
	ModelName "�
                    @"
Looks like VBE was successful. Have a good day.
	VendorName "SDC"
	# Monitor Manufactured week 0 of 2011
	# EDID version 1.3
	# Digital Display
	DisplaySize 340 190
	Gamma 2.20
	Option "DPMS" "false"
	Modeline 	"Mode 0" 69.39 1366 1414 1446 1464 768 770 775 790 -hsync -vsync 
EndSection


как вытащить данные из DisplaySize 340 190
grep не могу использовать так как он видет весь текст как одну строку.

Как вытащить данные с помощью awk или может есть другая утилита для вывода диагонали?
Я думаю здесь нужно использовать регулярные выражения, только я не очень с ним знаком.

РЕШЕНО!
Как узнал диагональ
edid=`get-edid | parse-edid`
echo -e "$(edid)" | grep 'DisplaySize' | awk '{print sprintf("%,1f". sqrt("$2*$2+$3*$3")*0.04)}'
  • Вопрос задан
  • 3973 просмотра
Решения вопроса 1
DevMan
@DevMan
edid=`get-edid | parse-edid`
echo -e "${edid}" | grep 'DisplaySize' | awk '{print $2"x"$3}'

340х190
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
fallen8rwtf
@fallen8rwtf
grep DisplaySize| awk {'print$2,$3'}
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы