Demonpants,
Your problem is related to the spaces in the directory names.
There is no problem with your statement:
The above will loop through all files that end with ".h5m".
If single or double quotes are used in this case, the shell will
take it literally as "*.h5m".
When I execute following shell script I am getting the following error
syntax error at line 50 : `<<' unmatched
What am I doing wrong :confused:
Script begins here
----------------
MPAN_FILE=$1
exec 3<$MPAN_FILE ... (2 Replies)
Does anyone see anything wrong with this.
#getInfraFiles()
#{
# cd Infra/$DAY
# rm *
# /usr/bin/ftp -i -n $LINE << cmd
# user "$USER" "$PASSWD"
# cd $INFRAPATH
# binary
# mget *
# bye
#}
besides that its commented out (4 Replies)
Hello,
I have a simple script such as
-----------------------------
#! /bin/sh
YEAR=`date -u +%Y`;
MONTH=`date -u +%m`;
DAY=`date -u +%d`;
DATE=$MONTH$DAY$YEAR
LOGFILES=auditTrail-$DATE
LOGMATCH=$LOGFILES\*
ARGUM=''
# find all files and write them to a file
find . -name... (7 Replies)
when user select option 2 nothing happen.for testing purpose I put
echo command but is not executing .
basically when user prompt for option 2,I want to get list of database name from user separeted by space (TEST DEVL)
and put into the file seprated by new line
TEST
DEVL
after that stay on... (1 Reply)
For one of my script, I want one extra parameter needs to be added to one of the Usage option. Below its given
#Check Input parameters are valid
if ; then
function usage() {
echo
echo "*******************************************"
echo " !!! USAGE... (2 Replies)
I am working on a simple login ID check shell script that should prompt for a user ID then check to see if this user is logged on. Trying to get the hang of this stuff so I am thinking of my own little projects.
#! /bin/sh
echo "please enter a user name"
read user
if user=$user
then... (3 Replies)
Hi ! all I am just trying to check range in my datafile
pls tell me why its resulting wrong
admin@IEEE:~/Desktop$ cat test.txt
0 28.4
5 28.4
10 28.4
15 28.5
20 28.5
25 28.6
30 28.6
35 28.7
40 28.7
45 28.7
50 28.8
55 28.8
60 28.8
65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies
LEARN ABOUT PHP
odbc_execute
ODBC_EXECUTE(3) 1 ODBC_EXECUTE(3)odbc_execute - Execute a prepared statementSYNOPSIS
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)