Sponsored Content
Full Discussion: Query on Code
Top Forums UNIX for Beginners Questions & Answers Query on Code Post 303033476 by RudiC on Saturday 6th of April 2019 04:10:31 AM
Old 04-06-2019
Yes, that's a "Parameter Expansion / Remove matching suffix pattern".


man bash:
Quote:
${parameter%word}
${parameter%%word}

Remove matching suffix pattern. The word is expanded to produce a pattern just as in pathname expansion. If the pattern matches a trailing portion of the
expanded value of parameter, then the result of the expansion is the expanded value of parameter with the shortest matching pattern (the ``%'' case) or the long”
est matching pattern (the ``%%'' case) deleted.
These 2 Users Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

query

I have converted data written on excel sheet in unix through shell & perl prg now the problem is I want that if starting columns of the xls sheet is Blank than when data is converted into unix then it should appear with this '|' sign. but it appearing like this: hfgg|tytt| but I want like... (2 Replies)
Discussion started by: akash
2 Replies

2. Shell Programming and Scripting

query.....

hi friends i want to know details of `exec` exact use of this command ..... actually i went through the man page but i didn`t get the satisfactory ...conclusion.... thaks in advance.... (1 Reply)
Discussion started by: newson
1 Replies

3. Shell Programming and Scripting

Excel related query for the code..need help..

find /A/B/C/{1,3,5,7} -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name "*.dat" |xargs ls -ltr |awk '{print $8 ,$9}' > result.xls it will give the result that is $8 and &9 in the result file... let say i need the result is a excel file....and i need the result to be print like $8 field... (10 Replies)
Discussion started by: sapan123
10 Replies

4. UNIX for Dummies Questions & Answers

Need Help on query

I just started to learn unix - need help to write a script to query a logfile and produce the results that contains a specific word "alarm" for a period from X day to Y day. I really have no idea how to begin - :( please help... ____________________________________________________ #... (1 Reply)
Discussion started by: snipfer
1 Replies

5. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

I would like to use the result of a query in another query. How do I redirect/add the output to another variable? $result = odbc_exec($connect, $query); while ($row = odbc_fetch_array($result)) { echo $row,"\n"; } odbc_close($connect); ?> This will output hostnames: host1... (0 Replies)
Discussion started by: hazno
0 Replies

6. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

7. Shell Programming and Scripting

want to query : YES or NO

hi i want to make script. where i want to query from the user yes or no exp: do you want to proceed : y for yes n for NO. how this is possible in unix (3 Replies)
Discussion started by: dodasajan
3 Replies

8. Shell Programming and Scripting

html code in SQL query

Hi expert, I have a script which is connecting with sql internally, fetch same data, store it in a file and then from os I cat this file and sending it to mail (windows outlook). This is working fine, I just need to know wether we can add some html codes with the sql query like we can add... (0 Replies)
Discussion started by: mcagaurav
0 Replies

9. Programming

JDBC code to pass the SQL query as parameter and execute?

Below i have the sample code. i need to pass the entire query from file or as parameter and read the results and write into a output file. here the number of columns are unknown. some times it may be 2,3 or entire columns from the table. read all the column results and write into a comma... (0 Replies)
Discussion started by: laknar
0 Replies

10. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 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:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy