I want to copy the xinput-calibrator output to the temp.txt file from my Qt application.
I am starting the QProcess from the Application
Using the command xinput_calibrator | tee log.txt
, I am able to copy the complete text but I need to save only few lines of the output to the file
Below is the output of the xinput_calibrator
Warning: multiple calibratable devices found, calibrating last one (VirtualBox mouse integration)
use --device to select another one.
Calibrating EVDEV driver for "VirtualBox mouse integration" id=12
current calibration values (from XInput): min_x=4, max_x=65512 and min_y=-52, max_y=65816
Doing dynamic recalibration:
Setting new calibration data: 66, 65483, -125, 65584
--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
Identifier "calibration"
MatchProduct "VirtualBox mouse integration"
Option "Calibration" "66 65483 -125 65584"
EndSection
Just I need copy last 5 lines to the temp.txt file
xinput_calibrator | | tail -n 5 | tee log.txt
? – Mar 30 '16 at 05:48