Maybe this excerpt from the egrep man page will help you to better understand how egrep works, note the sentence that I have underlined:
DESCRIPTION
grep searches the named input FILEs (or standard input if no files are
named, or the file name - is given) for lines containing a match to the
given PATTERN. By default, grep prints the matching lines.
---------- Post updated at 00:54 ---------- Previous update was at 00:50 ----------
I have a PERL script from which I need to make a HTTP request to Web Servlet (Essentially a URL with variables and values like &Variable1=AAAAAA&Variable2=BBBBBBBBB&Variable3=CCCCCCC). The Web servlet returns an XML result which needs to be parsed for the contents of the result within the program.... (15 Replies)
How can i make something like
if (echo "$arg2" | egrep -s '^+\.+km/h+$|^+km/h+$'); then
not to output the value of $arg2 on the screen, evertime i get match it outputs the value of the variable on the screen which i don't need to do. I know for grep its -q option but it doesn't work for egrep.... (2 Replies)
Hi I've been searching google and have not found what egrep -c means. Does anyone know where I can get a cheat sheet or what that -c means?
thanks,
Linda (2 Replies)
Hi Guys,
we have a shell script which basically query the Database which retrieves huge data and use the data with "egrep" .
Now there is some data which contains characters like "abc)" and the same is used like below :
"egrep (.+\|GDPRAB16\|GDPR/11702 96 abc)\|$ temp.txt"
now while... (7 Replies)
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)
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)
Hi All,
I am having a query regarding the usage of egrep command.
i am having two unix environmanets in environment when i am using
"egrep -f" it is working fine and other unix environment i am getting a syntax error.
Please let me know if i need to set any environmane variables.
... (12 Replies)
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)
Hello All,
I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns.
So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Discussion started by: vikas_trl
7 Replies
LEARN ABOUT SUNOS
wsreg_query_set_id
wsreg_query_set_id(3WSREG) Product Install Registry Library Functions wsreg_query_set_id(3WSREG)NAME
wsreg_query_set_id, wsreg_query_get_id - set or get the uuid of a query
SYNOPSIS
cc [flag ...] file ...-lwsreg [library ...]
#include <wsreg.h>
int wsreg_query_set_id(Wsreg_query *query, const char *uuid);
char *wsreg_query_get_id(const Wsreg_query *query);
DESCRIPTION
The wsreg_query_set_id() function sets the uuid (universal unique identifier) specified by uuid in the query specified by query. If a uuid
has already been set in the specified query, the resources associated with the previously set uuid are released.
The wsreg_query_get_id() function returns the uuid associated with the query specified by query. The resulting string is not a copy and
must not be released by the caller.
RETURN VALUES
The wsreg_query_set_id() function returns non-zero if the uuid was set correctly; otherwise 0 is returned.
The wsreg_query_get_id() function returns the uuid associated with the specified query.
USAGE
The query identifies fields used to search for a specific component in the product install registry. By specifying the uuid, the component
search is narrowed to all components in the product install registry that have the specified uuid.
Other fields can be specified in the same query to further narrow the search.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO wsreg_get(3WSREG), wsreg_initialize(3WSREG), towsreg_query_create(3WSREG), attributes(5)SunOS 5.10 22 Sep 2000 wsreg_query_set_id(3WSREG)