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 302396142 by johnjerome on Wednesday 17th of February 2010 10:11:42 PM
Old 02-17-2010
yes * implies wildcard

the string may be abctest123 or test123 or 123test
 

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
EvmEventNameMatch(3)					     Library Functions Manual					      EvmEventNameMatch(3)

NAME
EvmEventNameMatch, EvmEventNameMatchStr - Match event name LIBRARY
EVM Support Library (libevm.so, libevm.a) SYNOPSIS
#include <evm/evm.h> EvmStatus_t EvmEventNameMatch( const char *pattern, EvmEvent_t event, EvmBoolean_t *match); EvmStatus_t EvmEventNameMatchStr( const char *pattern, const char *candidate, EvmBoolean_t *match); OPERANDS
The event name pattern sought. The pattern may be any valid event name string. It may include wildcard characters in place of any compo- nent. The event containing the event name to be compared against the pattern. The result of the match. This parameter is set to EvmTRUE if the name matches the pattern, and to EvmFALSE if it does not. A character string to be matched against the pattern DESCRIPTION
Because special matching rules apply when deciding whether a candidate event name matches a known name, the EVM name matching functions should be used for matching purposes, rather than the C string comparison functions (memcpm(), strcmp()) . The EVM functions match an event name against a supplied pattern, ignoring any trailing appended components in the candidate name, and correctly matching wildcard characters. The EvmEventNameMatch function takes an event and an event name pattern as input, and returns an indication of whether the event contains a name which matches the pattern in the match output argument. The pattern may be any valid event name string, and may also include wildcard characters in place of any component. A wildcard * in the pattern matches zero or more name components. A ? matches exactly one compo- nent. A match occurs if the event name matches all components indicated by the pattern, even if the name has additional trailing elements. The EvmEventNameMatchStr function performs the same check as EvmEventNameMatch, but takes a character string as the candidate event name, rather than extracting it from a supplied event. Both functions set the match output argument to EvmTRUE if the name matches the pattern, and to EvmFALSE if it does not. RETURN VALUES
The comparison was successful. The value of the match parameter indicates whether the name matches the pattern. The supplied pattern con- tains invalid characters. The supplied event does not contain a name. ERRORS
None FILES
None SEE ALSO
Routines: memccpy(3), strcat(3) Event Management: EVM(5) EVM Events: EvmEvent(5) Programmer's Guide delim off EvmEventNameMatch(3)
All times are GMT -4. The time now is 02:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy