With that logic this echoes "echo". Question about echo!
doesn't echoes anything. And it's logic. But
does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo"
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
So in my shell i execute:
{ while true; do echo string; sleep 1; done } | read line This waits one second and returns.
But
{ while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly.
I have tried this in bash as well as zsh,... (2 Replies)
Hello All
Nice to meet you all here in this forum,
it's my 1rst time here
i'm asking about a little issue that i face
i added a ksh script that echo " please insert your name " and store the output to a login.log file.
the script is working fine with normal telnet
but Xstart is not working... (8 Replies)
Hello, I have a simple(I think) question!
Although simple, I have been unable to resolve it, so I hope someone can help! OK, here it is:
1)I have an awk script that prints something, such as:
awk '{print $2}' a > x
so x might hold the value of say '10'
2)Now, I just want to check to see if... (4 Replies)
Hi guys,
I have a shell script where I have the following:
for i in ad0 ad1
do
gpart create -s gpt $i || echo "Cannot create GPT partition on "$i". Exiting ..."
gpart add -s 128 -t freebsd-boot $i || echo "Cannot add freebsd-boot partition on "$i". Exiting ..."
gpart add -s 4G -t... (2 Replies)
Hi Folks,
As per the subject, the following command is not working as expected.
echo $variable | mail -s "subject" "xxx@xxx.com"
Could anyone figure it out whats wrong with this. I am using AIX box.
Regards, (2 Replies)
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Hi guys,
Been messing around with shell programming for a couple of days and I found something that was pretty odd in the behavior of the echo command. Below is an example-:
When I type the following in my /home directory from my lxterminal in Debian-:
echo "`ls -l`"
I get the... (2 Replies)
what happens when I echo asterisk?
Please don't hijack other peoples' thread; post our own new one as required by forum rules! (5 Replies)
Discussion started by: ithenr00
5 Replies
LEARN ABOUT PHP
oci_field_name
OCI_FIELD_NAME(3)OCI_FIELD_NAME(3)oci_field_name - Returns the name of a field from the statementSYNOPSIS
string oci_field_name (resource $statement, mixed $field)
DESCRIPTION
Returns the name of the $field.
PARAMETERS
o $statement
- A valid OCI statement identifier.
o $field
- Can be the field's index (1-based) or name.
RETURN VALUES
Returns the name as a string, or FALSE on errors.
EXAMPLES
Example #1
oci_field_name(3) example
<?php
// Create the table with:
// CREATE TABLE mytab (number_col NUMBER, varchar2_col varchar2(1),
// clob_col CLOB, date_col DATE);
$conn = oci_connect("hr", "hrpwd", "localhost/XE");
if (!$conn) {
$m = oci_error();
trigger_error(htmlentities($m['message']), E_USER_ERROR);
}
$stid = oci_parse($conn, "SELECT * FROM mytab");
oci_execute($stid, OCI_DESCRIBE_ONLY); // Use OCI_DESCRIBE_ONLY if not fetching rows
echo "<table border="1">
";
echo "<tr>";
echo "<th>Name</th>";
echo "<th>Type</th>";
echo "<th>Length</th>";
echo "</tr>
";
$ncols = oci_num_fields($stid);
for ($i = 1; $i <= $ncols; $i++) {
$column_name = oci_field_name($stid, $i);
$column_type = oci_field_type($stid, $i);
echo "<tr>";
echo "<td>$column_name</td>";
echo "<td>$column_type</td>";
echo "</tr>
";
}
echo "</table>
";
// Outputs:
// Name Type
// NUMBER_COL NUMBER
// VARCHAR2_COL VARCHAR2
// CLOB_COL CLOB
// DATE_COL DATE
oci_free_statement($stid);
oci_close($conn);
?>
NOTES
Note
In PHP versions before 5.0.0 you must use ocicolumnname(3) instead. This name still can be used, it was left as alias of
oci_field_name(3) for downwards compatability. This, however, is deprecated and not recommended.
SEE ALSO oci_num_fields(3), oci_field_type(3), oci_field_size(3).
PHP Documentation Group OCI_FIELD_NAME(3)