I am new to shell, and I am trying to do a if statement like the following:
if ; then
basically it works fine if both arguments of the if are met, however the next elif is:
elif ; then
if the conditions of the elif are met, then it says "final1.sh: line 67: [: too many arguments"
... (6 Replies)
The printf statement
pay_amount=$(printf "%013.3f" "$4")
working perfectly at one path(xxx/home/rsh) and showing error (printf: 216.000: invalid number) at another path(/opt/xxxx/xxxx).
what will be the reason?
thanks in advance (4 Replies)
Hello friends,
I have a boubt passing different arguments at a time for any one option in below code.
I would also like to check which option has been selected (any one of i, r, u ) so that whether or not matching argument passed can be verified.
for i and r - install and re-install -... (4 Replies)
What would be correct syntax in a script to check to see if a /export/nfs/home mount point is mounted and if not stop/abort? OS is Solaris 10 using standard VI ksh shell. Here is the script. Please tell me where you see the problem.
#!/bin/bash
#
# This script is run as root to sync AMI PROD... (0 Replies)
Hi all
I'm new to this forum and I really hope someone can help me out with a (for you guys) fairly easy question.
I want to have a script that takes 1-14 arguments, all numbers 1-14, say
myscript 1 3 4 5 7
what the script shall do is basically generare a textfile that contains 16... (5 Replies)
Hi
Am pretty new to C..
Am trying to pass the arguments from command line and use them in switch case statement..
i have tried the following
#include <stdlib.h>
main(int argc, char* argv)
{
int num=0;
if ( argc == 2 )
num = argv;
printf("%d is the num value",num);
switch ( num )
... (2 Replies)
hi all i need to add the prinf statement in awk command for the converted comma separated output....
below is my code :
Code Credits :RudiC
awk -F, 'NF==2 {next}
{ITM=$1
AMT=$2+0
CNT=$3+0
TOTA+=$2
... (4 Replies)
hi all,
I had my script as
a=qw
b=rter
c=fdfd
curency=1000
printf"${curency} $a $b $c" > filename
can i have printf statement that can change the currency from 1000 to 1,000 like it should convert the number to currency format ..?(i.e for any number) (14 Replies)
Hello,
I have a question regarding the usage statement of a script.
I have 2 parameters "--pto" and "--pto_list". To start the script I will need one of them. Both together are not possible.
How this would be printed out within a usage statement?
My suggestion would be:
Usage:... (4 Replies)
I'm stuck on a particular problem and need some guidance. I have a file with a name and a phone number in it (teledir.txt). I need to do a $# in a separate script to take a positional parameter and check to see if it is in the file. To quote the question:
If one argument is supplied, check... (6 Replies)
Discussion started by: Eric7giants
6 Replies
LEARN ABOUT SUSE
execute
EXECUTE(7) SQL Commands EXECUTE(7)NAME
EXECUTE - execute a prepared statement
SYNOPSIS
EXECUTE name [ ( parameter [, ...] ) ]
DESCRIPTION
EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the pre-
pared statement must have been created by a PREPARE statement executed earlier in the current session.
If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE
statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of
their parameters; the name of a prepared statement must be unique within a database session.
For more information on the creation and usage of prepared statements, see PREPARE [prepare(7)].
PARAMETERS
name The name of the prepared statement to execute.
parameter
The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the
data type of this parameter, as was determined when the prepared statement was created.
OUTPUTS
The command tag returned by EXECUTE is that of the prepared statement, and not EXECUTE.
EXAMPLES
Examples are given in the Examples [prepare(7)] section of the PREPARE [prepare(7)] documentation.
COMPATIBILITY
The SQL standard includes an EXECUTE statement, but it is only for use in embedded SQL. This version of the EXECUTE statement also uses a
somewhat different syntax.
SEE ALSO
DEALLOCATE [deallocate(7)], PREPARE [prepare(7)]
SQL - Language Statements 2010-05-14 EXECUTE(7)