Hi,
my perl script is calling another external java program. The Java in turn prints out a string. how can I capture the string.
------------------
#!/usr/bin/perl
print "Content-type:text/html\n\n";
use CGI;
$query = new CGI;
$theCookie = $query->cookie('someCookie');
$user =... (0 Replies)
Hi all,
I have a list of data below.
As long as there are same character in the 1st column (eg xxx ), i would want to add all the numbers in the 3rd column and display as the output below so the total would be 10+20+30 = 60. Can anybody help to do this using nawk? Using solaris by the way. ... (12 Replies)
I used printf to print the following under SFU,
lrs=`cat lrs`
hrs=`cat hrs`
tp=`cat tp`
printf “\n\n%5sM = $lrs Ohms%5sX = $hrs Ohms%5sT = $tp %%\n\n\n” > file
cat file
With the above script, I used %% after $tp only as a percentage sign and I get only the following output:
% T =... (5 Replies)
Hello experts,
I'm testing a program that prints error message to the screen.
I want to redirect the output to a file using >. but the message only prints on screen and not writing to the file,
Any suggestion on what I might try? (3 Replies)
Hi all ,
I have a view in teradata , the ouput of that view have to be stored as a file with delimitere as '|'.Is there any possibility of doing this in unix ?
Thanks in advance ,
Vinoth (6 Replies)
I have this input file
Switch 0; Sun Sep 11 12:40:53 2011 EDT (GMT+4:00)
12:40:53.159984 SCN Port Offline;g=0x1e4b6 A2,P0 A2,P0 379 NA
12:40:53.159991 *Removing all nodes from port A2,P0 A2,P0 379 NA
18:45:31.326604 Port Elp engaged ... (1 Reply)
Hi,
i am trying to get the system model with the help of awk :
$ prtconf | awk '/^System Model/'
System Model: IBM,8408-E8D
but i want just the below outout that is command should chk for pattern <IBM,> and remove it from the final output :
System Model:8408-E8D
Can... (2 Replies)
Hi All,
Seeking for your assistance on how to ouput the file which is not match in file 1 and file 2 using awk. I tried NR=FNR but it's not working, it will only show the match record.
Ex.
File1
abc
def
ghi
File2
23a
gd
abc
Output:
abc (2 Replies)
HI ,
I m looking for help here!!!
Can we filter the below log data into CSV format ?
timestamp INFO <text > - Some text Drive ..
Need a format of separate field such as
1 2 3 4 ... (2 Replies)
Discussion started by: MohSalNiz
2 Replies
LEARN ABOUT PHP
mysqlnd_qc_set_cache_condition
MYSQLND_QC_SET_CACHE_CONDITION(3) 1 MYSQLND_QC_SET_CACHE_CONDITION(3)mysqlnd_qc_set_cache_condition - Set conditions for automatic cachingSYNOPSIS
bool mysqlnd_qc_set_cache_condition (int $condition_type, mixed $condition, mixed $condition_option)
DESCRIPTION
Sets a condition for automatic caching of statements which do not contain the necessary SQL hints to enable caching of them.
PARAMETERS
o $condition_type
- Type of the condition. The only allowed value is MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN.
o $condition
- Parameter for the condition set with condition_type. Parameter type and structure depend on condition_type If condition_type
equals MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN condition must be a string. The string sets a pattern. Statements are cached if
table and database meta data entry of their result sets match the pattern. The pattern is checked for a match with the db and
org_table meta data entries provided by the underlying MySQL client server library. Please, check the MySQL Reference manual for
details about the two entries. The db and org_table values are concatenated with a dot ( .) before matched against condition. Pat-
tern matching supports the wildcards % and _. The wildcard % will match one or many arbitrary characters. _ will match one arbi-
trary character. The escape symbol is backslash.
o $condition_option
- Option for condition. Type and structure depend on condition_type. If condition_type equals MYSQLND_QC_CONDI-
TION_META_SCHEMA_PATTERN condition_options is the TTL to be used.
EXAMPLES
Example #1
mysqlnd_qc_set_cache_condition(3) example
<?php
/* Cache all accesses to tables with the name "new%" in schema/database "db_example" for 1 second */
if (!mysqlnd_qc_set_cache_condition(MYSQLND_QC_CONDITION_META_SCHEMA_PATTERN, "db_example.new%", 1)) {
die("Failed to set cache condition!");
}
$mysqli = new mysqli("host", "user", "password", "db_example", "port");
/* cached although no SQL hint given */
$mysqli->query("SELECT id, title FROM news");
$pdo_mysql = new PDO("mysql:host=host;dbname=db_example;port=port", "user", "password");
/* not cached: no SQL hint, no pattern match */
$pdo_mysql->query("SELECT id, title FROM latest_news");
/* cached: TTL 1 second, pattern match */
$pdo_mysql->query("SELECT id, title FROM news");
?>
RETURN VALUES
Returns TRUE on success or FALSE on FAILURE.
SEE ALSO
Quickstart: pattern based caching.
PHP Documentation Group MYSQLND_QC_SET_CACHE_CONDITION(3)