You definitely need to split your pipeline into single commands and analyse each one of them separately in order to identify what is going wrong. I don't know the voronota command, what it requires, and what its outputs should look like, but piping some file through three instances of it is somewhat new to me.
Re. your single quote question, to me the double quoting seems to do exactly what you need. echoing your third voronota command with the respective variables and quoting yields:
Hi there
I have a data file like so below
'A/1';'T100002';'T100002';'';'01/05/2004';'31/05/2004';'01/06/2004';'08/06/2004';'1.36';'16';'0.22';'0';'0';'1.58';'0';'0';'0';'0';'0';'0';'clientes\resumen\200405\resumen_T100002_T100002_1.pdf';'';'0001';'S';'20040501';'';'02';'0';'S';'N'... (3 Replies)
Hi
I have a shell script with many lines as below:
comment on column dcases.proj_seq_num is dcases_1sq;
....
....
I want the above script to be as below:
comment on column dcases.proj_seq_num is 'dcases_1sq';
I want to have single quotes like that as above for the entire shell... (2 Replies)
Hi,
I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file:
Name = "abc"
The regex I'm using to match the same is:
egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Hi I want to replace single quote with two single quotes in a perl string.
If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
hi all,
i have a data in the file which of the formate :
100,102,103
and the required formate is
\'100\',\'102\',\'103
Idealy we need to replace , with \',\'
Regards
arkesh (2 Replies)
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Hello,
I'd like to print line if column 5th doesn't match with exm. But to reach there I have to make sure I match single quote.
I'm struggling to match that.
I've input file like:
Warning: Variants 'exm480340' and '5:137534453:G:C' have the same position.
Warning: Variants 'exm480345'... (9 Replies)
Hi all...
(This is Don's domain.)
I have come across an anomaly in sh and dash compared to bash.
It involves echoing a character set to a file in sh and dash compared to bash.
It is probably easier to show the code and results first.
#!/usr/local/bin/dash
#!/bin/sh
#!/bin/bash
echo... (4 Replies)
Discussion started by: wisecracker
4 Replies
LEARN ABOUT PHP
pg_query_params
PG_QUERY_PARAMS(3)PG_QUERY_PARAMS(3)pg_query_params - Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL commandtext.SYNOPSIS
resource pg_query_params ([resource $connection], string $query, array $params)
DESCRIPTION
Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.
pg_query_params(3) is like pg_query(3), but offers additional functionality: parameter values can be specified separately from the command
string proper. pg_query_params(3) is supported only against PostgreSQL 7.4 or higher connections; it will fail when using earlier versions.
If parameters are used, they are referred to in the $query string as $1, $2, etc. The same parameter may appear more than once in the
$query; the same value will be used in that case. $params specifies the actual values of the parameters. A NULL value in this array means
the corresponding parameter is SQL NULL.
The primary advantage of pg_query_params(3) over pg_query(3) is that parameter values may be separated from the $query string, thus avoid-
ing the need for tedious and error-prone quoting and escaping. Unlike pg_query(3), pg_query_params(3) allows at most one SQL command in the
given string. (There can be semicolons in it, but not more than one nonempty command.)
PARAMETERS
o $connection
- PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection
is the last connection made by pg_connect(3) or pg_pconnect(3).
o $query
- The parameterized SQL statement. Must contain only a single statement. (multiple statements separated by semi-colons are not
allowed.) If any parameters are used, they are referred to as $1, $2, etc. User-supplied values should always be passed as param-
eters, not interpolated into the query string, where they form possible SQL injection attack vectors and introduce bugs when han-
dling data containing quotes. If for some reason you cannot use a parameter, ensure that interpolated values are properly escaped.
o $params
- An array of parameter values to substitute for the $1, $2, etc. placeholders in the original prepared query string. The number
of elements in the array must match the number of placeholders. Values intended for bytea fields are not supported as parameters.
Use pg_escape_bytea(3) instead, or use the large object functions.
RETURN VALUES
A query result resource on success or FALSE on failure.
EXAMPLES
Example #1
Using pg_query_params(3)
<?php
// Connect to a database named "mary"
$dbconn = pg_connect("dbname=mary");
// Find all shops named Joe's Widgets. Note that it is not necessary to
// escape "Joe's Widgets"
$result = pg_query_params($dbconn, 'SELECT * FROM shops WHERE name = $1', array("Joe's Widgets"));
// Compare against just using pg_query
$str = pg_escape_string("Joe's Widgets");
$result = pg_query($dbconn, "SELECT * FROM shops WHERE name = '{$str}'");
?>
SEE ALSO pg_query(3).
PHP Documentation Group PG_QUERY_PARAMS(3)