Sponsored Content
Full Discussion: Need Help on query
Top Forums UNIX for Dummies Questions & Answers Need Help on query Post 302276874 by angheloko on Wednesday 14th of January 2009 11:04:37 PM
Old 01-15-2009
Hi snip,

You can start with this:

Code:
ls | while read $file_to_read
do
	grep -sin "alarm" $file_to_read
done

Just modify it a little. You can use a combination of find, ls, or grep and you'll finally get there Smilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

query

hi, how can i do the following..... i have file containing followig a k 10000 b c 200000 d e 50 a j 40 how can i list all rows containg last value more than 1000? and how can i find number of blank rows in the file? THANKS! regards vivek (2 Replies)
Discussion started by: vivekshankar
2 Replies

2. 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

3. 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

4. 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

5. Shell Programming and Scripting

Query

hi i am producing txt outputs of archives created by our tsm software. problem is some of these files are too large to open in excel so i can despatch. here is a example of the output TAG_460 /prod_bak 7 FILE /ARCHIVE/Whistles- ... (4 Replies)
Discussion started by: treds
4 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. UNIX for Dummies Questions & Answers

Query

Hi, I have a script to remove null values from a file. Could any one explain how this is working? :confused: while read f do echo process $f gawk... (0 Replies)
Discussion started by: abhi_n123
0 Replies

9. 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
RDF::Redland::QueryResults(3pm) 			User Contributed Perl Documentation			   RDF::Redland::QueryResults(3pm)

NAME
RDF::Redland::QueryResults - Redland RDF Syntax Query Results Class SYNOPSIS
use RDF::Redland; ... my $query=new RDF::Redland::Query("query string", undef, undef, "sparql"); my $results=$model->query_execute($query); # or my $results=$query->execute($model); while(!$results->finished) { for (my $i=0; $i < $results->bindings_count(); $i++) { my $name=$results->binding_name($i); my $value=$results->binding_value($i); # ... do something with the results } $results->next_result; } The $results in the example is an object of class RDF::Redland::QueryResults. DESCRIPTION
This class represents queries of various syntaxes over an RDF::Redland::Model returning a sequence of results that bind variable names to RDF::Redland::Node values. CONSTRUCTOR
There are no public constructors. METHODS
count Return the number of current results from the query. finished Return non-0 if the results have been exhausted. binding_name INDEX Get the name of variable binding INDEX in the array of variable names. binding_names Get the names all of the variable bindings as an array. binding_value INDEX Get the value of the variable binding INDEX in the current query result. binding_values Get the values of all of the variable bindings in the current query result. binding_value_by_name NAME Get the value of the variable binding NAME in the current query result. bindings Get the variable names and values of the current query result as a hash bindings_count Return the number of variable bindings. next_result Move to the next query result. as_stream Return a new RDF::Redland::Stream object representing the query results as an RDF Graph. to_string [FORMAT-URI [BASE-URI]] Serialize to a string syntax in format FORMAT-URI using the optional BASE-URI. The default format when none is given is determined by librdf_query_results_to_string. is_bindings Return non-0 if the query results format is variable bindings is_boolean Return non-0 if the query results format is a boolean is_graph Return non-0 if the query results format is an RDF graph get_boolean Get the boolean query result; non-0 is true. SEE ALSO
RDF::Redland::Query AUTHOR
Dave Beckett - http://www.dajobe.org/ perl v5.14.2 2011-02-04 RDF::Redland::QueryResults(3pm)
All times are GMT -4. The time now is 06:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy