10-26-2018
Let me see if I have this straight. You have file names in temp/input like temp/input/NMP1515O.CL.20181026111213, temp/input/NMP1515O.CM.20181025111213, etc, which you need to process in order of date by sorting into temp/CM and temp/CL. Only move a file when these folders are empty (implying the files we move in there will also disappear automatically).
Have I got that right?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to create a command to copy a file with a restriction- if the file exists at the copy destination, the copy does not occur and message is provided that file already exists. (3 Replies)
Discussion started by: thoffpauir
3 Replies
2. UNIX for Dummies Questions & Answers
I was sure there was a way to put a timestamp ina logfile but I can't seem to figure out how.
What I would like to do is after the last messages in the rptmgr.err log is put a timestamp so I know the next time I look whats new. I am using AIX 5.1
any help will great
Thanks (2 Replies)
Discussion started by: rocker40
2 Replies
3. Shell Programming and Scripting
Oracle procedure create files on UNIX folder on a regular basis. I need to FTP files onto windows server and place the files, based on their name, in the corresponding folders. File name is as follows: ccyymmddfoldernamefile.txt; Folder Name length could be of any size; however, the prefix and... (3 Replies)
Discussion started by: MeganP
3 Replies
4. Shell Programming and Scripting
I want to output screen messages to a logfile when executing an automated script. I have tried the script and command to do this but with no luck.
Thanks,
Nicole (5 Replies)
Discussion started by: nsutti
5 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I've set up a script so that a user answers questions, and then these answers come back onto the screen accompanied by text that I've echoed. Is there a way of putting this into a new file?
Thanks (7 Replies)
Discussion started by: likelylad
7 Replies
6. Shell Programming and Scripting
This is the file structure:
DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg
DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg
DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg
DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg
DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies
7. Shell Programming and Scripting
Hi All,
This is what I am trying to achieve but to no avail.
I have three sets of files which are:
1. One big dictionary file which looks like this:
apple
orange
computer
pear
country
2. Some thousands of text files which are named as 1.dat, 2.dat, 3.dat etc
The text files... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
8. Red Hat
I am using du -h --max-depth=2 to get list of folders by size upto 2 levels down. Problem is I am not able to sort them in max folder size.
Normally this can be achieved by using du -k | sort -nr * but I can't use it here since it conflicts (the -s argument) with the --max-depth=2 argument.
... (1 Reply)
Discussion started by: rockf1bull
1 Replies
9. UNIX for Dummies Questions & Answers
Hi guys,
Just want to ask how can I make a script that will perform like this.
1. Execute the command
2. Then the output of the command will be redirected to a file
2. The file that has been created will have a date on it equivalent to the date and time it was created (or maybe after the... (5 Replies)
Discussion started by: rymnd_12345
5 Replies
10. Shell Programming and Scripting
I have a file with the following content:
a-123-345-232
a-23343-4545-545
a-67676-45454-8787
a-129-8912-9824
b-564-78678-2322
b-5454-76767-8899
b-85554-124-152-29
c-34534-654543-323
(... and so on, actually these are pretty huge records)
Now, I want that the file should not be broken in to... (8 Replies)
Discussion started by: askerbis
8 Replies
LEARN ABOUT PHP
maxdb_stmt_result_metadata
MAXDB_STMT_RESULT_METADATA(3) 1 MAXDB_STMT_RESULT_METADATA(3)
maxdb_stmt_result_metadata - Returns result set metadata from a prepared statement
Procedural style
SYNOPSIS
resource maxdb_stmt_result_metadata (resource $stmt)
DESCRIPTION
Object oriented style
resource maxdb_stmt::result_metadata (void )
If a statement passed to maxdb_prepare(3) is one that produces a result set, maxdb_stmt_result_metadata(3) returns the result resource
that can be used to process the meta information such as total number of fields and individual field information.
Note
This result set pointer can be passed as an argument to any of the field-based functions that process result set metadata, such as:
omaxdb_num_fields(3)
omaxdb_fetch_field(3)
omaxdb_fetch_field_direct(3)
omaxdb_fetch_fields(3)
omaxdb_field_count(3)
omaxdb_field_seek(3)
omaxdb_field_tell(3)
omaxdb_free_result(3)
The result set structure should be freed when you are done with it, which you can do by passing it to maxdb_free_result(3)
Note
The result set returned by maxdb_stmt_result_metadata(3) contains only metadata. It does not contain any row results. The rows are
obtained by using the statement handle with maxdb_fetch(3).
RETURN VALUES
maxdb_stmt_result_metadata(3) returns a result resource or FALSE if an error occurred.
EXAMPLES
Example #1
Object oriented style
<?php
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
$maxdb->query("CREATE TABLE temp.friends (id int, name varchar(20))");
$maxdb->query("INSERT INTO temp.friends VALUES (1,'Hartmut')");
$maxdb->query("INSERT INTO temp.friends VALUES (2, 'Ulf')");
$stmt = $maxdb->prepare("SELECT id, name FROM temp.friends");
$stmt->execute();
/* get resultset for metadata */
$result = $stmt->result_metadata();
/* retrieve field information from metadata result set */
$field = $result->fetch_field();
printf("Fieldname: %s
", $field->name);
/* close resultset */
$result->close();
/* close connection */
$maxdb->close();
?>
Example #2
Procedural style
<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
maxdb_query($link, "CREATE TABLE temp.friends (id int, name varchar(20))");
maxdb_query($link, "INSERT INTO temp.friends VALUES (1,'Hartmut')");
maxdb_query($link, "INSERT INTO temp.friends VALUES (2, 'Ulf')");
$stmt = maxdb_prepare($link, "SELECT id, name FROM temp.friends");
maxdb_stmt_execute($stmt);
/* get resultset for metadata */
$result = maxdb_stmt_result_metadata($stmt);
/* retrieve field information from metadata result set */
$field = maxdb_fetch_field($result);
printf("Fieldname: %s
", $field->name);
/* close resultset */
maxdb_free_result($result);
/* close connection */
maxdb_close($link);
?>
The above example will output something similar to:
Fieldname: ID
SEE ALSO
maxdb_prepare(3), maxdb_free_result(3).
PHP Documentation Group MAXDB_STMT_RESULT_METADATA(3)