Sponsored Content
Top Forums Shell Programming and Scripting ksh sed - Extract specific lines with mulitple occurance of interesting lines Post 302889923 by Akshay Hegde on Monday 24th of February 2014 12:35:49 PM
Old 02-24-2014
Try something like this worked with given sample

Code:
$ awk '/\*|Touch:/{if(gsub(/\*/,x))$0=$1 FS $2;print}' file

Slot 1
Touch: CTSDEV.1-9-6-2R-K9.P1.SPA
Touch: CTSDEV.1-9-6-2R-K9.P1.SPA-G

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extract specific lines from file

hi, how would i extract a range of lines in a file by using the line number? ex: file contains: 1 title 2 i want 3 this part 4 to be taken out 5 from this file 6 and sent to 7 another file 8 not needed 9 end of file In this case, i want to copy line number 2 to 7 on a new... (2 Replies)
Discussion started by: apalex
2 Replies

2. UNIX for Dummies Questions & Answers

Extract specific lines for graphing

Hello, I have a very large text file with about 2 million lines. Each of the lines starts like.. SNP_12345678 A 1212, 121, 343, ... SNP_12345678 B 4567, 567, 454, ... and so on. I want to extract specific SNPs and plot them by GNUplot or excel. The file is too large to be opened by text... (1 Reply)
Discussion started by: genehunter
1 Replies

3. Shell Programming and Scripting

extract the lines between specific line number from a text file

Hi I want to extract certain text between two line numbers like 23234234324 and 54446655567567 How do I do this with a simple sed or awk command? Thank you. ---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ---------- found it: sed -n '#1,#2p'... (1 Reply)
Discussion started by: return_user
1 Replies

4. Shell Programming and Scripting

Extract lines of text based on a specific keyword

I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility. I've been reading the forum & googling and can find... (4 Replies)
Discussion started by: DionDeVille
4 Replies

5. UNIX for Dummies Questions & Answers

unix: extract a specific list of lines from a file

I would like to extract specific lines from a file and output them into another file. Each line in the file has a unique ID, and I have a specific list of IDs (that are not consecutive) that I wish to extract. for example: 1 aaaaaa bbbcb cccccc 2 aaaaaa bbbbb cccccd 3 aaaaaa bbbab... (6 Replies)
Discussion started by: mert2481
6 Replies

6. Shell Programming and Scripting

Extract specific lines from a file

Hi, I have a file which contains DDL statements- CREATE TABLE, CREATE INDEX, ALTER TABLE etc. I have to only pick CREATE TABLE statements from the file- Source : ---------------------------------------------- --DDL for table abc -------------------------------------------- CREATE TABLE... (4 Replies)
Discussion started by: newb
4 Replies

7. Shell Programming and Scripting

Summing over specific lines and replacing the lines with the sum using sed, awk

Hi friends, This is sed & awk type question. I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example ###start of input text file #### abc def ghi 1 2 3 4 kjld random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies

8. UNIX for Dummies Questions & Answers

Extract lines with specific words with addition 2 lines before and after

Dear all, Greetings. I would like to ask for your help to extract lines with specific words in addition 2 lines before and after these lines by using awk or sed. For example, the input file is: 1 ak1 abc1.0 1 ak2 abc1.0 1 ak3 abc1.0 1 ak4 abc1.0 1 ak5 abc1.1 1 ak6 abc1.1 1 ak7... (7 Replies)
Discussion started by: Amanda Low
7 Replies

9. Shell Programming and Scripting

Extract lines with unique value using a specific column

Hi there, I need a help with extracting data from tab delimited file which look like this #CHROM POS ID REF ALT Human Cow Dog Mouse Lizard chr2 3033 . G C 0/0 0/0 0/0 1/1 0/0 chr3 35040 . G T 0/0 0/0 ./. 1/1 0/1 chr4 60584 . T G 1/1 1/1 0/1 1/1 0/0 chr10 7147815 . G A 0/0 1/1 0/0 0/0... (9 Replies)
Discussion started by: houkto
9 Replies

10. Shell Programming and Scripting

Extract specific lines based on another file

I have a folder containing text files. I need to extract specific lines from the files of this folder based on another file input.txt. How can I do this with awk/sed? file1 ARG 81.9 8 81.9 0 LEU 27.1 9 27.1 0 PHE .0 10 .0 0 ASP 59.8 11 59.8 0 ASN 27.6 12 27.6 0 ALA .0 13 .0 0... (5 Replies)
Discussion started by: alanmathew84
5 Replies
CITRON(4x)																CITRON(4x)

NAME
citron - Citron Infrared Touch Driver (CiTouch) SYNOPSIS
Section "InputDevice" Identifier "idevname" Driver "citron" Option "Device" "devpath" ... EndSection DESCRIPTION
citron is a XFree86 input driver for Citron Infrared Touch devices. The citron driver acts as a pointer input device, and may be used as the X server's core pointer. It is connected via a "RS232" with the host. SUPPORTED HARDWARE
At the moment the following touches are supported. They are also available as ZPress touches. IRT6I5-V2.x 6.5 inch Infrared Touch IRT10I4-V4.x 10.4 inch Infrared Touch IRT12I1-V2.x 12.1 inch Infrared Touch IRT15I1-V1.x 15.1 inch Infrared Touch CONFIGURATION DETAILS
Please refer to XF86Config(5x) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver. For better understanding please read also the CTS and various IRT manuals which are available in "pdf" format from Citron web page www.citron.de or directly from Citron. The following driver Options are supported: Option "Device" "devpath" Specify the device path for the citron touch. Valid devices are: /dev/ttyS0, /dev/ttyS1, ... This option is mandatory. It's important to specify the right device Note: com1 -> /dev/ttyS0, com2 -> /dev/ttyS1, ... Option "ScreenNumber" "screennumber" sets the screennumber for the citron InputDevice. Default: ScreenNumber: "0" Option "MinX" "value" Option "MinY" "value" These are the minimum X and Y values for the citron input device. Note: MinX, MinY must be less than MaxX, MaxY. Range: "0" - "65535" Default: MinX: "0" MinY: "0" Option "MaxX" "value" Option "MaxY" "value" These are the maximum X and Y values for the citron input device. Note: MaxX, MaxY must be greater than MinX, MinY. Range: "0" - "65535" Default: MaxX: "65535" MaxY: "65535" Option "ButtonNumber" "value" This value is responsible for the button number that is returned within the xf86PostButton event message Range: "0" - "255" Default: "1" Option "ButtonThreshold" "value" This value is responsible for the button threshold. It changes the pressure sensitivity of the touch. A higher number corresponds to a higher pressure. Note: This feature is only available with pressure sensitive hardware. Range: "0" - "255" Default: "20" Sleep-Mode If the IRT is in Doze-Mode and Touch Zone is not interrupted for another certain span of time, the so-called Sleep-Mode is acti- vated. The Sleep-Mode decreases the scan rate of the beams even further than the Doze-Mode does (see below). This way the life expectancy of the beams is prolonged and the power consumption of the IRT is reduced. As soon as an interruption of the Touch Zone is detected, the Sleep-Mode is deactivated and the Touch Zone will again be scanned with the maximum speed. With the Sleep-Mode activated, depending on the set scan rate the IRT's response time can be considerably longer as in normal operation. If, for exam- ple, a scan rate of 500 ms / scan is set, it may last up to a half of a second until the IRT detects the interruption and deacti- vates the Sleep-Mode. Option "SleepMode" "mode" This value is responsible for the sleep-mode of the touch. Determines the behaviour of the Sleep-Mode. 0x00 No message at either activation or deactivation 0x01 Message at activation 0x02 Message at deactivation 0x03 Message at activation and deactivation 0x10 GP_OUT output set according to the Sleep-Mode status Values: "0" "1" "2" "3" "16" Default: "0" Option "SleepTime" "time" This value is responsible for the sleep-time of the touch. It is the activation time in seconds ("0" = immediately activated, "65535" = always deactivated). Range: "0" - "65535" [s] Default: "65535" => deactivated Option "SleepScan" "scan" This value is responsible for the scan-time of the touch. This is the time interval between two scan operations while in Sleep-Mode. The time interval is set in steps of milliseconds. Range: "0" - "65535" [ms] Default: "500" Option "PWMActive" "value" This value determines the mark-to-space ratio of the PWM output while in normal operation (sleep-mode not active). Higher values result in longer pulse widths. This output signal can be used in conjunction with the Citron AWBI to do backlight-dimming via the touch. Range: "0" - "255" Default: "255" (max. brightness) Option "PWMSleep" "value" This value determines the mark-to-space ratio of the PWM output while in sleep-mode (-> SleepMode, SleepScan, SleepTime ) operation (sleep-mode active). Higher values result in longer pulse widths. Range: "0" - "255" Default: "255" (max. brightness) Option "PWMFreq" "value" This value determines the PWM frequency in Hertz. Range: "39" - "9803" Default: "9803" (max. frequency) Option "ClickMode" "mode" With mode one can select between 5 ClickModes "1" = ClickMode Enter With this mode every interruption of the infrared beams will activate a ButtonPress event and after the interruption a ButtonRelease event will be sent. "2" = ClickMode Dual With this mode every interruption will sent a Proximity event and every second interruption a ButtonPress event. With the release of the interruption (while one interruption is still active) a ButtonRelease event will be sent. "3" = ClickMode Dual Exit With this mode every interruption will sent a ProximityIn event and every second interruption a ButtonPress event. With the release of the interruption (while one interruption is still active) no ButtonRelease event will be sent. Only if all interruptions are released a ButtonRelease followed by a ProximityOut event will be sent. "4" = ClickMode ZPress With this mode every interruption will sent a ProximityIn event. Only if a certain pressure is exceeded a ButtonPress event will occur. If the pressure falls below a certain limit a ButtonRelease event will be sent. After also the interruption is released a ProximityOut event is generated. "5" = ClickMode ZPress Exit This mode is similar to "Clickmode Dual Exit". The first interruption of the beams will sent a ProximityIn event. Only if a certain pressure is exceeded a ButtonPress event will occur. If the pressure falls below a certain limit no ButtonRelease event will be sent. After the interruption is also released a ButtonRelease followed by a ProximityOut event is generated. Range: "1" - "5" Default: "1" (ClickMode Enter) Option "Origin" "value" This value sets the coordinates origin to one of the four corners of the screen. The following values are accepted: "0" TOPLEFT: Origin set to the left-hand side top corner. "1" TOPRIGHT: Origin set to the right-hand side top corner. "2" BOTTOMRIGHT: Origin set to the right-hand side bottom corner. "3" BOTTOMLEFT: Origin set to the left-hand side bottom corner. Range: "0" - "3" Default: "0" (TOPLEFT) Doze-Mode If for a certain span of time the Touch Zone is not interrupted, the so-called Doze-Mode is automatically activated. The activated Doze-Mode slightly decreases the scan rate of the beams. This way the power consumption of the IRT is reduced. As soon as an inter- ruption of the Touch Zone is detected, the Doze-Mode is deactivated and the Touch Zone will again be scanned with the maximum speed. Option "DozeMode" "mode" This value is responsible for the doze-mode of the touch. Determines the behaviour of the Doze-Mode. 0x00 No message at either activation or deactivation 0x01 Message at activation 0x02 Message at deactivation 0x03 Message at activation and deactivation 0x10 GP_OUT output set according to the Doze-Mode status If the GP_OUT output is already controlled by the Sleep-Mode it is no longer available as an output port anymore. Values: "0" "1" "2" "3" "16" Default: "0" Option "DozeTime" "time" This value is responsible for the doze-time of the touch. It is the activation time in seconds ("0" = immediately activated, "65535" = always deactivated). Range: "0" - "65535" [s] Default: "65535" => deactivated Option "DozeScan" "scan" This value is responsible for the scan-time of the touch. This is the time interval between two scan operations while in Doze-Mode. The time interval is set in steps of milliseconds. Range: "0" - "65535" [ms] Default: "500" Option "DeltaX" "value" This value determines a virtual area at the left and right side of the current cursor position where the cursor didn't move. Within this area no "MotionNotify" event will be sent. Range: "0" - "255" Default: "0" (no deltaX) Option "DeltaY" "value" This value determines a virtual area at the top and bottom of the current cursor position where the cursor didn't move. Within this area no "MotionNotify" event will be sent. Range: "0" - "255" Default: "0" (no deltaY) Option "Beep" "value" This value determines if a "ButtonPress" and/or a "ButtonRelease" event should sound the buzzer. "0" deactivates the buzzer while every other value will activate it. Range: "0" - "1" Default: "0" (deactivated) Option "PressVol" "value" This value determines the volume of the buzzer (0-100%) when a "ButtonPress" event is sent. Range: "0" - "100" Default: "100" Option "PressPitch" "value" This value determines the pitch of the tone when a "ButtonPress" event is sent. Range: "0" - "3000" Default: "880" Option "PressDur" "value" This value determines the duration of the tone in ms when a "ButtonPress" event is sent. Range: "0" - "255" Default: "15" Option "ReleaseVol" "value" This value determines the volume of the buzzer (0-100%) when a "ButtonRelease" event is sent. Range: "0" - "100" Default: "100" Option "ReleasePitch" "value" This value determines the pitch of the tone when when a "ButtonRelease" event is sent. Range: "0" - "3000" Default: "1200" Option "ReleseDur" "value" This value determines the duration of the tone in ms when when a "ButtonRelease" event is sent. Range: "0" - "255" Default: "10" Option "BeamTimeout" "value" Determines the time span in seconds, that has to elapse before a beam is considered defective, blanked-out and excluded from the coordinates evaluation. Range: "0" - "65535" Default: "30" (30 seconds) Option "TouchTime" "value" Determines the minimum time span in steps of 10ms for a valid interruption. In order for an interruption to be reported to the host computer as valid, it needs to remain at the same spot for at least the time span declared here. Range: "0" - "255" Default: "0" (=6,5 ms) Option "EnterCount" "count" Number of skipped "enter reports". Reports are sent approx. every 20ms. Range: "0" - "31" Default: "3" (3 skipped messages = 60ms) Option "ZEnterCount" "count" Number of skipped "enter reports" while in pressure sensitive mode. Reports are sent approx. every 20ms. Range: "0" - "31" Default: "1" (1 skipped messages = 20ms) Option "DualCount" "count" Number of skipped "dual touch error". Reports are sent approx. every 20ms. This option is only available for "ZPress" and "ZPress Exit" modes. Range: "0" - "31" Default: "2" (2 skipped messages = 40ms) SEE ALSO
XFree86(1), XF86Config(5x), xf86config(1), Xserver(1), X(7x). AUTHORS
2000-2001 - written by Citron GmbH (support@citron.de) XFree86 Version Version 4.3.0 CITRON(4x)
All times are GMT -4. The time now is 01:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy