One of our servers runs Solaris 8 and does not have "ls -lh" as a valid command. I wrote the following script to make the ls output easier to read and emulate "ls -lh" functionality. The script works, but it is slow when executed on a directory that contains a large number of files. Can anyone make... (10 Replies)
i have a small problem getting a batxh shell script to run in shell
this is the code
the problem seems to be centered around the ffmpeg command, something maybe to do with the ' ' wrapping around the vhook part command
this is a strange problem , if i take the ffmpeg command and... (1 Reply)
I am processing some terabytes of information on a computer having 8 processors (each with 4 cores) with a 16GB RAM and 5TB hard drive implemented as a RAID. The processing doesn't seem to be blazingly fast perhaps because of the IO limitation.
I am basically running a perl script to read some... (13 Replies)
I've a script to do some snapshots but the time it does so is very different...
once i got a snapshot under 1 sec, on the other hand it took 3 sec, but nothing else changed, i didnt even move the cursor or something.
I put the script on a ramdisk and its faster, but still swing from under 1... (1 Reply)
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
my $date_converted = UnixDate(ParseDate("3 days ago"),"%e/%h/%Y");
open FILE,">$ARGV";
while(<DATA>){
my @tab_delimited_array = split(/\t/,$_);
$tab_delimited_array =~ s/^\ =~ s/^\-//;
my $converted_date =... (2 Replies)
Can someone help me edit the below script to make it run faster?
Shell: bash
OS: Linux Red Hat
The point of the script is to grab entire chunks of information that concerns the service "MEMORY_CHECK".
For each chunk, the beginning starts with "service {", and ends with "}".
I should... (15 Replies)
Hi,
I need a shell script to determine if a no. is either even, greater than 4, less than 8
SHELL : ksh
OS : RHEL 6
this is the if block of the script
mod=`expr $num % 2`
if || ||
then
echo "No. is either even or greater than 4 or less than 8"
fi
this code works... (2 Replies)
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT PHP
pg_select
PG_SELECT(3)PG_SELECT(3)pg_select - Select recordsSYNOPSIS
mixed pg_select (resource $connection, string $table_name, array $assoc_array, [int $options = PGSQL_DML_EXEC])
DESCRIPTION pg_select(3) selects records specified by assoc_array which has field=>value. For a successful query, it returns an array containing all
records and fields that match the condition specified by assoc_array.
If options is specified, pg_convert(3) is applied to assoc_array with the specified flags.
PARAMETERS
o $connection
- PostgreSQL database connection resource.
o $table_name
- Name of the table from which to select rows.
o $assoc_array
- An array whose keys are field names in the table $table_name, and whose values are the conditions that a row must meet to be
retrieved.
o $options
- Any number of PGSQL_CONV_FORCE_NULL, PGSQL_DML_NO_CONV, PGSQL_DML_ESCAPE, PGSQL_DML_EXEC, PGSQL_DML_ASYNC or PGSQL_DML_STRING
combined. If PGSQL_DML_STRING is part of the $options then query string is returned. When PGSQL_DML_NO_CONV or PGSQL_DML_ESCAPE is
set, it does not call pg_convert(3) internally.
RETURN VALUES
Returns TRUE on success or FALSE on failure. Returns string if PGSQL_DML_STRING is passed via $options.
EXAMPLES
Example #1
pg_select(3) example
<?php
$db = pg_connect('dbname=foo');
// This is safe, since $_POST is converted automatically
$rec = pg_select($db, 'post_log', $_POST);
if ($rec) {
echo "Records selected
";
var_dump($rec);
} else {
echo "User must have sent wrong inputs
";
}
?>
CHANGELOG
+-------------+---------------------------------------------------+
| Version | |
| | |
| | Description |
| | |
+-------------+---------------------------------------------------+
| 5.6.0 | |
| | |
| | No longer experimental. Added PGSQL_DML_ESCAPE |
| | constant, TRUE/ FALSE and NULL data type support. |
| | |
|5.5.3/5.4.19 | |
| | |
| | Direct SQL injection to $table_name and Indirect |
| | SQL injection to identifiers are fixed. |
| | |
+-------------+---------------------------------------------------+
SEE ALSO pg_convert(3).
PHP Documentation Group PG_SELECT(3)