05-08-2008
I am using this echo statement in perl ... i want my output in color... i think i cant make the output on screen in color with " printf" statement.. please tell me if it is possible for printf to give colored output..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Does anyone know the correct syntax for computing arithmetic expressions inside the echo statement? Let me know, thanks (3 Replies)
Discussion started by: circleW
3 Replies
2. Shell Programming and Scripting
Is there an equivalent perl statement for the following ksh statement ?
example
if
then
...
else
...
fi (2 Replies)
Discussion started by: gefa
2 Replies
3. Shell Programming and Scripting
Hi,
Can some1 help me to output a tab in an echo statement.
I have tried
echo "RNC: \t NODEB"
but dont get the correct output.
I am a beginnger to unix, so pls hold back the laughs....if u can (5 Replies)
Discussion started by: sunils27
5 Replies
4. Shell Programming and Scripting
Hi All,
I am pasting my code below
if # e means file exists
then
echo OFR_Configlist exists >> OFR_Backup_Configfiles.log
else
echo OFR_Configlist Not exists >> OFR_Backup_Configfiles.log
exit
fi
How can i show the echo message in console also at the same time?
I dont want to write... (3 Replies)
Discussion started by: subin_bala
3 Replies
5. Shell Programming and Scripting
I have script like
echo -n FINISHED FEXP: ${TABLE2EXP}
echo $STATUS
I want the output of both the echo statement in one line
How can i do this (3 Replies)
Discussion started by: scorp_rahul23
3 Replies
6. Shell Programming and Scripting
Hi
How to set the ECHO off in shell scripts so that the default output will be hidden. (2 Replies)
Discussion started by: Joseph Antoine
2 Replies
7. Shell Programming and Scripting
I was searching for an option where i can echo some strings together with the contents of a file.
Eg. I was to echo the below string to a file
"alter application PMS_ add variable CurrYear Y2009;" >> ${ESS_MAXL_DIR}/PMS_SUB.txt
The value 2009 is coming from a file called date.txt without the... (3 Replies)
Discussion started by: Celvin VK
3 Replies
8. Shell Programming and Scripting
Hi all,
Encountered a wierd behaviour which I am unable to understand.
I have a function doing the follow:
function RETRIEVE_PASSWORD
{
if (( $DC_ACCOUNT ))
then
clear
printf "\nEnter Password for ${ConfiguredUser}"
printf... (1 Reply)
Discussion started by: srage
1 Replies
9. Shell Programming and Scripting
I need to concatinate a string (mapping-expression) with the output of below statement
EXPRESS="cat //normalization-binding//tag-normalization/tag-name"
echo $EXPRESS | xmllint --shell QA_Oct12_DIR.cfb | grep -v "/ >" >> "/home/testBinding.txt"
above statement write value="$6061" into... (1 Reply)
Discussion started by: bkc
1 Replies
10. Shell Programming and Scripting
I have this code that sometimes return a false value and the code inside the if statement gets executed and error out. Any idea why? thanks.
So I set a debug and see what the value for $ScriptElapsedTime
Here is the value I got ScriptElapsedTime='03:20'. Base on this value the if... (10 Replies)
Discussion started by: nugent
10 Replies
LEARN ABOUT PHP
cubrid_prepare
CUBRID_PREPARE(3) 1 CUBRID_PREPARE(3)
cubrid_prepare - Prepare a SQL statement for execution
SYNOPSIS
resource cubrid_prepare (resource $conn_identifier, string $prepare_stmt, [int $option])
DESCRIPTION
The cubrid_prepare(3) function is a sort of API which represents SQL statements compiled previously to a given connection handle. This
pre-compiled SQL statement will be included in the cubrid_prepare(3).
Accordingly, you can use this statement effectively to execute several times repeatedly or to process long data. Only a single statement
can be used and a parameter may put a question mark (?) to appropriate area in the SQL statement. Add a parameter when you bind a value in
the VALUES clause of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a MARK(?) by using the
cubrid_bind(3) function only.
PARAMETERS
o $conn_identifier
-Connection identifier.
o $prepare_stmt
-Prepare query.
o $option
-OID return option CUBRID_INCLUDE_OID.
RETURN VALUES
Request identifier, if process is successful;
FALSE, if process is unsuccessful.
EXAMPLES
Example #1
cubrid_prepare(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$sql = <<<EOD
SELECT g.event_code, e.name
FROM game g
JOIN event e ON g.event_code=e.code
WHERE host_year = ? AND event_code NOT IN (SELECT event_code FROM game WHERE host_year=?) GROUP BY event_code;
EOD;
$req = cubrid_prepare($conn, $sql);
cubrid_bind($req, 1, 2004);
cubrid_bind($req, 2, 2000);
cubrid_execute($req);
$row_num = cubrid_num_rows($req);
printf("There are %d event that exits in 2004 olympic but not in 2000. For example:
", $row_num);
printf("%-15s %s
", "Event_code", "Event_name");
printf("----------------------------
");
$row = cubrid_fetch_assoc($req);
printf("%-15d %s
", $row["event_code"], $row["name"]);
$row = cubrid_fetch_assoc($req);
printf("%-15d %s
", $row["event_code"], $row["name"]);
cubrid_disconnect($conn);
?>
The above example will output:
There are 27 event that exits in 2004 olympic but not in 2000. For example:
Event_code Event_name
----------------------------
20063 +91kg
20070 64kg
SEE ALSO
cubrid_execute(3), cubrid_bind(3).
PHP Documentation Group CUBRID_PREPARE(3)