Sponsored Content
Top Forums Shell Programming and Scripting Matching part of a string that is in an array Post 302527460 by zatarra777 on Friday 3rd of June 2011 10:56:01 AM
Old 06-03-2011
Thanks for the quick reply.
how would i go about making that so that it would also work if I wanted to know if they were not equal?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

vi part-pattern matching and deletion

Hi, I have a log file which shows the files which has been changed over the last week. They follow this pattern: old_file_version_number@@new_file_version_number Now I need to know how to delete from each line parts starting from @@. I would be issuing the command inside vi(m). So... (5 Replies)
Discussion started by: vino
5 Replies

2. Shell Programming and Scripting

sed problem - replacement string should be same length as matching string.

Hi guys, I hope you can help me with my problem. I have a text file that contains lines like this: 78 ANGELO -809.05 79 ANGELO2 -5,000.06 I need to find all occurences of amounts that are negative and replace them with x's 78 ANGELO xxxxxxx 79... (4 Replies)
Discussion started by: amangeles
4 Replies

3. Shell Programming and Scripting

Search array elements as file for a matching string

I would like to find a list of files in a directory less than 2 days old and put them into an array variable. And then search for each file in the array for a matching string say "Return-code= 0". If it matches, then display the array element with a message as "OK". Your help will be greatly... (1 Reply)
Discussion started by: mkbaral
1 Replies

4. Shell Programming and Scripting

Problem extracting just a part of a matching pattern

Hello everyone, this is my first post so please give me a hand. I apologize for my English, I'll try to be clear with my request. I need to write a script (Bash) which finds all the variables defined in the file .h of the folder and then writes the name of the files .c where these variables are... (1 Reply)
Discussion started by: paxilpaz
1 Replies

5. Shell Programming and Scripting

Hex to decimal - Execute command for the matching part

Alo I have this input: 0x10=some text 0x20=some text 0x30=some text and want this output: 16=some text 32=some text 48=some text I want to use a command to convert from hex to decimal i.e.: $ echo $((0x15a)) or $ printf '%d\n' 0x15a I try to use something like this: sed... (5 Replies)
Discussion started by: chitech
5 Replies

6. Shell Programming and Scripting

perl: array matching

Hi, I have two files like this file 1: xxtcgtatccgaggga cgcgcgggggagg jjsjjjjsjjjdtcgtat aaaaaaacccaaan ggtcgtatffaadda gggctggalllslllssdkk file 2: tcgtat gctggaI want to 1) match each element of file2 to each element of file1. 2) delete all the matched alphabets and subsequent... (3 Replies)
Discussion started by: polsum
3 Replies

7. Shell Programming and Scripting

PERL : Read an array and write to another array with intial string pattern checks

I have an array and two variables as below, I need to check if $datevar is present in $filename. If so, i need to replace $filename with the values in the array. I need the output inside an ARRAY How can this be done. Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies

8. Shell Programming and Scripting

Use double quotes as part of the string in a Bash array

So I need to create an array that has " in the string of the text: string = ( "value 1" "value2" where the actual string is "value1" with the quotations included would this work? string = ( \"value1\" \"value\") and if the strings contain spaces as well: string = ("\"this... (4 Replies)
Discussion started by: os2mac
4 Replies

9. Shell Programming and Scripting

Taking out part of a string by matching a pattern

Hi All, My Problem is like below. I have a file which contains just one row and contains data like PO_CREATE12457888888888889SK1234567878744551111111111SK89456321145789955455555SK8888888815788852222 i want to extract SK12345678 SK89456321 SK88888888 So basically SK and next 8... (4 Replies)
Discussion started by: Asfakul Islam
4 Replies

10. UNIX for Beginners Questions & Answers

How to 'improve' this script and also 'fix' the pattern matching part?

Hi all, Below is my script. It is currently working but I want some advice on maybe improving it and need some help on the pattern matching xx.ksh: #!/bin/ksh # # ------------------------------------------------------------------------------------------------- # #Fatal NI connect error... (3 Replies)
Discussion started by: newbie_01
3 Replies
xcb_xkb_get_device_info(3)					   XCB Requests 					xcb_xkb_get_device_info(3)

NAME
xcb_xkb_get_device_info - SYNOPSIS
#include <xcb/xkb.h> Request function xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info(xcb_connection_t *conn, xcb_xkb_device_spec_t deviceSpec, uint16_t wanted, uint8_t allButtons, uint8_t firstButton, uint8_t nButtons, xcb_xkb_led_class_spec_t ledClass, xcb_xkb_id_spec_t ledID); Reply datastructure typedef struct xcb_xkb_get_device_info_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint16_t present; uint16_t supported; uint16_t unsupported; uint16_t nDeviceLedFBs; uint8_t firstBtnWanted; uint8_t nBtnsWanted; uint8_t firstBtnRtrn; uint8_t nBtnsRtrn; uint8_t totalBtns; uint8_t hasOwnState; uint16_t dfltKbdFB; uint16_t dfltLedFB; uint8_t pad0[2]; xcb_atom_t devType; uint16_t nameLen; } xcb_xkb_get_device_info_reply_t; Reply function xcb_xkb_get_device_info_reply_t *xcb_xkb_get_device_info_reply(xcb_connection_t *conn, xcb_xkb_get_device_info_cookie_t cookie, xcb_generic_error_t **e); Reply accessors xcb_xkb_string8_t *xcb_xkb_get_device_info_name(const xcb_xkb_get_device_info_request_t *reply); int xcb_xkb_get_device_info_name_length(const xcb_xkb_get_device_info_reply_t *reply); xcb_generic_iterator_t xcb_xkb_get_device_info_name_end(const xcb_xkb_get_device_info_reply_t *reply); xcb_xkb_action_t *xcb_xkb_get_device_info_btn_actions(const xcb_xkb_get_device_info_request_t *reply); int xcb_xkb_get_device_info_btn_actions_length(const xcb_xkb_get_device_info_reply_t *reply); xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator(const xcb_xkb_get_device_info_reply_t *reply); int xcb_xkb_get_device_info_leds_length(const xcb_xkb_get_device_info_reply_t *reply); xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator(const xcb_xkb_get_device_info_reply_t *reply); REQUEST ARGUMENTS
conn The XCB connection to X11. deviceSpec TODO: NOT YET DOCUMENTED. wanted TODO: NOT YET DOCUMENTED. allButtons TODO: NOT YET DOCUMENTED. firstButton TODO: NOT YET DOCUMENTED. nButtons TODO: NOT YET DOCUMENTED. ledClass TODO: NOT YET DOCUMENTED. ledID TODO: NOT YET DOCUMENTED. REPLY FIELDS
response_type The type of this reply, in this case XCB_XKB_GET_DEVICE_INFO. This field is also present in the xcb_generic_reply_t and can be used to tell replies apart from each other. sequence The sequence number of the last request processed by the X11 server. length The length of the reply, in words (a word is 4 bytes). deviceID TODO: NOT YET DOCUMENTED. present TODO: NOT YET DOCUMENTED. supported TODO: NOT YET DOCUMENTED. unsupported TODO: NOT YET DOCUMENTED. nDeviceLedFBs TODO: NOT YET DOCUMENTED. firstBtnWanted TODO: NOT YET DOCUMENTED. nBtnsWanted TODO: NOT YET DOCUMENTED. firstBtnRtrn TODO: NOT YET DOCUMENTED. nBtnsRtrn TODO: NOT YET DOCUMENTED. totalBtns TODO: NOT YET DOCUMENTED. hasOwnState TODO: NOT YET DOCUMENTED. dfltKbdFB TODO: NOT YET DOCUMENTED. dfltLedFB TODO: NOT YET DOCUMENTED. devType TODO: NOT YET DOCUMENTED. nameLen TODO: NOT YET DOCUMENTED. DESCRIPTION
RETURN VALUE
Returns an xcb_xkb_get_device_info_cookie_t. Errors have to be handled when calling the reply function xcb_xkb_get_device_info_reply. If you want to handle errors in the event loop instead, use xcb_xkb_get_device_info_unchecked. See xcb-requests(3) for details. ERRORS
This request does never generate any errors. SEE ALSO
AUTHOR
Generated from xkb.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_xkb_get_device_info(3)
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy