03-04-2013
Amazing, no temp file and not even a while loop!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I wish to compare two ebcdic files.
diff utility manual says it only compares two text files line by line.. I doubt this will be good for ebcdic files.
cmp utility does binary comparision but I do not find any thing in manual referring if it does support ebcdic file format.
let... (2 Replies)
Discussion started by: RishiPahuja
2 Replies
2. Shell Programming and Scripting
Can you please help me with writing script for following purpose.
I have to divide single large web access log file into multiple log files based on dates inside the log file.
For example:
if data is logged in the access file for jan-10-08 , jan-11-08 , Jan-12-08
then make small log file... (1 Reply)
Discussion started by: kamleshm
1 Replies
3. Shell Programming and Scripting
Hi all,
I have three files, one is a navigation file, one is a depth file and one is a file containing the measured field of gravity. The formats of the files are;
navigation file:
2006 320 17 39 0 0 *nav 21.31542 -157.887
2006 320 17 39 10 0 *nav 21.31542 -157.887
2006 320 17 39 20 0... (2 Replies)
Discussion started by: andrealphus
2 Replies
4. UNIX for Dummies Questions & Answers
I need a script (perl or awk..anything is fine) to join 3 files based on three key columns. The no of non-key columns can vary in each file. The columns are delimited by semicolon.
For example,
File1
Dim1;Dim2;Dim3;Fact1;Fact2;Fact3;Fact4;Fact5
---- data delimited by semicolon ---
... (1 Reply)
Discussion started by: Sebben
1 Replies
5. UNIX for Advanced & Expert Users
Hey everyone.
I am trying to figure out a way to create a file that will be renamed based off of one of multiple files. For example, if I have 3 files (cat.ctl, dog.ctl, and bird.ctl) that gets placed on to an ftp site I want to create a single file called new.cat.ctl, new.dog.ctl, etc for each... (3 Replies)
Discussion started by: coach5779
3 Replies
6. Shell Programming and Scripting
Hello everyone!
I have 2 types of files in the following format:
1) *.fa
>1234
...some text...
>2345
...some text...
>3456
...some text...
.
.
.
.
2) *.info
>1234 (7 Replies)
Discussion started by: ad23
7 Replies
7. Shell Programming and Scripting
uadm@4132> ls -lrt
-rw------- 1 uadm uadm 3811819 Jun 6 04:08 data_log-2010.05.30-10:04:08.txt
-rw------- 1 uadm uadm 716246 Jun 13 01:38 data_log-2010.06.06-10:04:08.txt
-rw------- 1 uadm uadm 996 Jun 13 04:00 data_log-2010.06.06-10:04:22.txt
-rw------- 1 uadm uadm 7471 Jun 20 02:03... (5 Replies)
Discussion started by: mail2sant
5 Replies
8. Shell Programming and Scripting
Dear Gurus,
I am a novice in shell scripts. I have a requirement where I need to move files every day from Current Folder to Archive folder.
Daily I will be receiving 5 files in the folder - /opt/data/feeds/.
The feeds folder has two sub-folders - Current and Archive.
For example the... (25 Replies)
Discussion started by: shankar1dada
25 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a file abc.dat. It contains the fileds of empid, empname, empcity. each city contains 10 records. i want to create the city file and pass the same city records into the file. I don't know the city names.
In unix using awk command how can we do?
abc.dat:
1 john delhi
2... (2 Replies)
Discussion started by: raghukreddy.ab
2 Replies
10. UNIX for Advanced & Expert Users
I want to search for a particular file name patterns and move them to a specific folder, is it possible to do it with awk or sed? (1 Reply)
Discussion started by: rudoraj
1 Replies
LEARN ABOUT PHP
maxdb_stmt_errno
MAXDB_STMT_ERRNO(3) 1 MAXDB_STMT_ERRNO(3)
maxdb_stmt_errno - Returns the error code for the most recent statement call
Procedural style
SYNOPSIS
int maxdb_stmt_errno (resource $stmt)
DESCRIPTION
Object oriented style
int$maxdb_stmt->errno ()
For the statement specified by stmt, maxdb_stmt_errno(3) returns the error code for the most recently invoked statement function that can
succeed or fail.
Note
For possible error codes see documentation of SQLDBC: http://maxdb.sap.com/documentation/.
RETURN VALUES
An error code value. Zero means no error occurred.
EXAMPLES
Example #1
Object oriented style
<?php
/* Open a connection */
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s
", maxdb_connect_error());
exit();
}
$maxdb->query("CREATE TABLE temp.mycity LIKE hotel.city");
$maxdb->query("INSERT INTO temp.mycity SELECT * FROM hotel.city");
$query = "SELECT name, zip FROM temp.mycity ORDER BY name";
if ($stmt = $maxdb->prepare($query)) {
/* drop table */
$maxdb->query("DROP TABLE temp.mycity");
/* execute query */
$stmt->execute();
printf("Error: %d.
", $stmt->errno);
/* close statement */
$stmt->close();
}
/* close connection */
$maxdb->close();
?>
Example #2
Procedural style
<?php
/* Open a connection */
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s
", maxdb_connect_error());
exit();
}
maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city");
maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city");
$query = "SELECT name, zip FROM temp.mycity ORDER BY name";
if ($stmt = maxdb_prepare($link, $query)) {
/* drop table */
maxdb_query($link, "DROP TABLE temp.mycity");
/* execute query */
maxdb_stmt_execute($stmt);
printf("Error: %d.
", maxdb_stmt_errno($stmt));
/* close statement */
maxdb_stmt_close($stmt);
}
/* close connection */
maxdb_close($link);
?>
The above example will output something similar to:
Warning: maxdb_stmt_execute(): -4004 POS(23) Unknown table name:MYCITY [42000] <...>
Error: -4004.
SEE ALSO
maxdb_stmt_error(3), maxdb_stmt_sqlstate(3).
PHP Documentation Group MAXDB_STMT_ERRNO(3)