02-08-2013
Try using double quotes instead of single quotes. And, reading these forums might have helped from the beginning.
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to replace the default home page for several mac user accounts, I wrote a script that will hunt the files down and replace them with a pre-configured set. The problem I am having is that the download destination path for the browser is hard coded into a .plist (text config file) file... (5 Replies)
Discussion started by: tret
5 Replies
2. Shell Programming and Scripting
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies
3. Shell Programming and Scripting
How do i replace a string using sed into the same file without creating a intermediate file? (7 Replies)
Discussion started by: gomes1333
7 Replies
4. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies
5. Shell Programming and Scripting
Hi Fellows,
I am new to shell, please help we me out in this..
i have file which some lines like this..
$$param1='12-jan-2011'
$$param2='14-jan-2011'
$$param3='30-jan-2011'
.
.
.....so on..
I want to change $$param3 to '31-dec-2011'. i have variable which is storing(30-jan-2011 this... (1 Reply)
Discussion started by: victor369
1 Replies
6. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
7. Shell Programming and Scripting
I have a list of names and email addresses.
Sample File -
username=poga--poga@yahoo.com
new-york,US
512834
username=poga123--poga123@hotmail.com
new-jersey,US
0894753
Requirement is to replace the email ids as dummy_username@xyz.com using sed only.
Output File -... (4 Replies)
Discussion started by: poga
4 Replies
8. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
9. Shell Programming and Scripting
Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file:
</member>
<member>
<name>TransactionID</name>
<value><string>123456789123456</string></value>
</member>
<member>
<name>Number</name>
... (9 Replies)
Discussion started by: cozzin
9 Replies
10. Shell Programming and Scripting
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
LEARN ABOUT PHP
odbc_execute
ODBC_EXECUTE(3) 1 ODBC_EXECUTE(3)
odbc_execute - Execute a prepared statement
SYNOPSIS
bool odbc_execute (resource $result_id, [array $parameters_array])
DESCRIPTION
Executes a statement prepared with odbc_prepare(3).
PARAMETERS
o $result_id
- The result id resource, from odbc_prepare(3).
o $parameters_array
- Parameters in $parameter_array will be substituted for placeholders in the prepared statement in order. Elements of this array
will be converted to strings by calling this function. Any parameters in $parameter_array which start and end with single quotes
will be taken as the name of a file to read and send to the database server as the data for the appropriate placeholder. If you
wish to store a string which actually begins and ends with single quotes, you must add a space or other non-single-quote character
to the beginning or end of the parameter, which will prevent the parameter from being taken as a file name. If this is not an
option, then you must use another mechanism to store the string, such as executing the query directly with odbc_exec(3)).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
odbc_execute(3) and odbc_prepare(3) example
In the following code, $success will only be TRUE if all three parameters to myproc are IN parameters:
<?php
$a = 1;
$b = 2;
$c = 3;
$stmt = odbc_prepare($conn, 'CALL myproc(?,?,?)');
$success = odbc_execute($stmt, array($a, $b, $c));
?>
If you need to call a stored procedure using INOUT or OUT parameters, the recommended workaround is to use a native extension for your
database (for example, mssql for MS SQL Server, or oci8 for Oracle).
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 4.2.0 | |
| | |
| | File reading is now subject to safe mode and |
| | open-basedir restrictions in $parameters_array. |
| | |
+--------+---------------------------------------------------+
SEE ALSO
odbc_prepare(3).
PHP Documentation Group ODBC_EXECUTE(3)