Sponsored Content
Full Discussion: Matching string
Top Forums UNIX for Dummies Questions & Answers Matching string Post 302168505 by nehaquick on Monday 18th of February 2008 03:39:03 PM
Old 02-18-2008
MySQL

dear robotronic

thanks a lot for the reply. its working correctly but its still asking for another character even when the word is there. i think more needs to be put in the while condition. apart from that as evident its a game, i have to keep a count of no of guesses by the user and as well as the lives the user lost(wrong guesses). i dont know where to update those variables in the current loop. thanks in advance

Last edited by nehaquick; 02-18-2008 at 05:02 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

matching alphanumeric string

how to match an alphanumeric string like the following. i have to do like the following. if the input line is the data is {clock_91b} i have to replace that with the string was ("clock_91b") i tried like $line =~ s/the data is\s+\{(+)\}/the string was \(\"$1\"\)/ which... (4 Replies)
Discussion started by: sskb
4 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

String matching

for a certain directory, I want to grep a particular file called ABCD so what I do is ls /my/dir | grep -i "ABCD" | awk '{print $9}' however, there is also this file called ABCDEFG, the above command would reurn both file when I only want ABCD, please help! (3 Replies)
Discussion started by: mpang_
3 Replies

4. Shell Programming and Scripting

string matching in perl

Hi, I have to search for a string in a variable. Say the variable is var1='ERROR: Make java] as enabled' here i want to match which are in red color. other like abc etc could change. Can you tell me the exact command something like the below in perl if ($var1=~ m/ERROR: Make... (3 Replies)
Discussion started by: ammu
3 Replies

5. Shell Programming and Scripting

matching a string

I have a requirement of shell script where i need to read the File name i.e ls -t | head -1 and Match that Filename with some delimited values which are in a separate File. For Example i am reading the File name i.e (ls -t | head -1) after that i need to read one more sequential file which... (2 Replies)
Discussion started by: dsdev_123
2 Replies

6. Shell Programming and Scripting

Matching 2 items in a string

Little lost here, I am trying to search a line for both values after the $ signs. My ultimate goal is to get percertage. <?php $string = "Something on sale for $4 and orginal price $10"; $strstr =. strstr($string, '$'); $strrchr =. strrchr($string, '$'); echo "$strstr<br>"; echo... (1 Reply)
Discussion started by: mrlayance
1 Replies

7. Shell Programming and Scripting

String matching

I have a string like ab or abc of whatever length. But i want to know whether another string ( for example, abcfghijkl, OR a<space> bcfghijkl ab<space> cfghijkl OR a<space>bcfghijkl OR ab<space> c<space> fghijkl ) starts with ab or abc... space might existing on the longer string... If so, i... (4 Replies)
Discussion started by: nram_krishna@ya
4 Replies

8. Shell Programming and Scripting

Matching string from input to string of file

Hi, i want to know how to compare string of file with input string im trying following code: file_no=`paste -s -d "||||\n" a.txt | cut -c 1` #it will return collection number from file echo "enter number" read " curr_no" if ; then echo " current number already present" fi ... (4 Replies)
Discussion started by: a_smith
4 Replies

9. Shell Programming and Scripting

String matching using awk

Hello, I am working with google ngram data set which is of size 100s of gb. Before using it with Java, I wanted to filter it out using shell script. Here is a sample line in the file: 2.55 1.57 1992 10 20 30 The first two fields (2.55 and 1.57) are... (3 Replies)
Discussion started by: shekhar2010us
3 Replies

10. UNIX for Dummies Questions & Answers

Matching string

Hello all, i am trying to match a string and based on that proceed with my script or error out... i have a file called /tmp/sta.log that will be populated by oracle's spooling..it can have a output of either 2 of the below (OPEN or errors/ORACLE not avaiable) $ cat /tmp/sta.log OPEN $ $... (2 Replies)
Discussion started by: abdul.irfan2
2 Replies
xcb_dri2_get_buffers(3) 					   XCB Requests 					   xcb_dri2_get_buffers(3)

NAME
xcb_dri2_get_buffers - SYNOPSIS
#include <xcb/dri2.h> Request function xcb_dri2_get_buffers_cookie_t xcb_dri2_get_buffers(xcb_connection_t *conn, xcb_drawable_t drawable, uint32_t count, uint32_t attachments_len, const uint32_t *attachments); Reply datastructure typedef struct xcb_dri2_get_buffers_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t width; uint32_t height; uint32_t count; uint8_t pad1[12]; } xcb_dri2_get_buffers_reply_t; Reply function xcb_dri2_get_buffers_reply_t *xcb_dri2_get_buffers_reply(xcb_connection_t *conn, xcb_dri2_get_buffers_cookie_t cookie, xcb_generic_error_t **e); Reply accessors xcb_dri2_dri2_buffer_t *xcb_dri2_get_buffers_buffers(const xcb_dri2_get_buffers_request_t *reply); int xcb_dri2_get_buffers_buffers_length(const xcb_dri2_get_buffers_reply_t *reply); xcb_dri2_dri2_buffer_iterator_t xcb_dri2_get_buffers_buffers_iterator(const xcb_dri2_get_buffers_reply_t *reply); REQUEST ARGUMENTS
conn The XCB connection to X11. drawable TODO: NOT YET DOCUMENTED. count TODO: NOT YET DOCUMENTED. attachments_len TODO: NOT YET DOCUMENTED. attachments TODO: NOT YET DOCUMENTED. REPLY FIELDS
response_type The type of this reply, in this case XCB_DRI2_GET_BUFFERS. 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). width TODO: NOT YET DOCUMENTED. height TODO: NOT YET DOCUMENTED. count TODO: NOT YET DOCUMENTED. DESCRIPTION
RETURN VALUE
Returns an xcb_dri2_get_buffers_cookie_t. Errors have to be handled when calling the reply function xcb_dri2_get_buffers_reply. If you want to handle errors in the event loop instead, use xcb_dri2_get_buffers_unchecked. See xcb-requests(3) for details. ERRORS
This request does never generate any errors. SEE ALSO
AUTHOR
Generated from dri2.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_dri2_get_buffers(3)
All times are GMT -4. The time now is 07:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy