Sponsored Content
Top Forums Shell Programming and Scripting How to check weather a string is like test* or test* ot *test* in if condition Post 302396131 by methyl on Wednesday 17th of February 2010 09:09:29 PM
Old 02-17-2010
Please give many examples of strings which fulfil your conditions and some which do not. We are unclear whether the asterisk implies a wildcard or whether the asterisk is just a character.
 

7 More Discussions You Might Find Interesting

1. Linux

In unix how we can test or check race condition in c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (1 Reply)
Discussion started by: afroze
1 Replies

2. UNIX for Dummies Questions & Answers

In unix how we can test or check race condition in a c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (1 Reply)
Discussion started by: afroze
1 Replies

3. Programming

In unix how we can test or check race condition in c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (5 Replies)
Discussion started by: afroze
5 Replies

4. Programming

In unix how we can test or check race condition in a c program by using multi threads

In unix how we can test or check race condition in any c program by using multi thread programming (1 Reply)
Discussion started by: afroze
1 Replies

5. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

6. Shell Programming and Scripting

Shell script that check the argument passed to it and prints error if test condition is not met

I want to make a script that check for the argument passed to it and generates an error in case any character/string argument passed to it. I am using below code, but its not working. can anyone help. #!/bin/bash if ]; then echo 'An integer argument is passed to the script hence... (3 Replies)
Discussion started by: mukulverma2408
3 Replies

7. UNIX for Dummies Questions & Answers

Bash condition test at the end of string

I want to check (using bash condition test function) if string contains three spaces, ignoring last three spaces at the end of string. string_to_report='foo bar foo bar ' string_to_ignore='foo bar ' (8 Replies)
Discussion started by: useretail
8 Replies
XListFonts(3)							  XLIB FUNCTIONS						     XListFonts(3)

NAME
XListFonts, XFreeFontNames, XListFontsWithInfo, XFreeFontInfo - obtain or free font names and information SYNTAX
char **XListFonts(Display *display, char *pattern, int maxnames, int *actual_count_return); int XFreeFontNames(char *list[]); char **XListFontsWithInfo(Display *display, char *pattern, int maxnames, int *count_return, XFontStruct **info_return); int XFreeFontInfo(char **names, XFontStruct *free_info, int actual_count); ARGUMENTS
actual_count Specifies the actual number of font names. actual_count_return Returns the actual number of font names. count_return Returns the actual number of matched font names. display Specifies the connection to the X server. info_return Returns the font information. free_info Specifies the font information. list Specifies the array of strings you want to free. maxnames Specifies the maximum number of names to be returned. names Specifies the list of font names. pattern Specifies the null-terminated pattern string that can contain wildcard characters. DESCRIPTION
The XListFonts function returns an array of available font names (as controlled by the font search path; see XSetFontPath) that match the string you passed to the pattern argument. The pattern string can contain any characters, but each asterisk (*) is a wildcard for any num- ber of characters, and each question mark (?) is a wildcard for a single character. If the pattern string is not in the Host Portable Character Encoding, the result is implementation-dependent. Use of uppercase or lowercase does not matter. Each returned string is null- terminated. If the data returned by the server is in the Latin Portable Character Encoding, then the returned strings are in the Host Por- table Character Encoding. Otherwise, the result is implementation-dependent. If there are no matching font names, XListFonts returns NULL. The client should call XFreeFontNames when finished with the result to free the memory. The XFreeFontNames function frees the array and strings returned by XListFonts or XListFontsWithInfo. The XListFontsWithInfo function returns a list of font names that match the specified pattern and their associated font information. The list of names is limited to size specified by maxnames. The information returned for each font is identical to what XLoadQueryFont would return except that the per-character metrics are not returned. The pattern string can contain any characters, but each asterisk (*) is a wildcard for any number of characters, and each question mark (?) is a wildcard for a single character. If the pattern string is not in the Host Portable Character Encoding, the result is implementation-dependent. Use of uppercase or lowercase does not matter. Each returned string is null-terminated. If the data returned by the server is in the Latin Portable Character Encoding, then the returned strings are in the Host Portable Character Encoding. Otherwise, the result is implementation-dependent. If there are no matching font names, XListFontsWithInfo returns NULL. To free only the allocated name array, the client should call XFreeFontNames. To free both the name array and the font information array or to free just the font information array, the client should call XFreeFontInfo. The XFreeFontInfo function frees a font structure or an array of font structures and optionally an array of font names. If NULL is passed for names, no font names are freed. If a font structure for an open font (returned by XLoadQueryFont) is passed, the structure is freed, but the font is not closed; use XUnloadFont to close the font. Note that XListFontsWithInfo is not thread-safe. If other threads make X requests on the same Display, then this function's behavior is undefined. SEE ALSO
XLoadFont(3), XSetFontPath(3) Xlib - C Language X Interface X Version 11 libX11 1.5.0 XListFonts(3)
All times are GMT -4. The time now is 02:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy