Sponsored Content
Top Forums Shell Programming and Scripting Passing parameter more than 9 Post 302830195 by gacanepa on Monday 8th of July 2013 09:12:00 AM
Old 07-08-2013
I am not sure about ksh, but as far as bash is concerned, the single quotes DO NOT allow shell interpretation. That is to say, whatever is inside single quotes will be inserted into your database as a fixed string.
If you want to insert the values of your variables, you should consider hergp's suggestion or use doble quotes as in the following example:
Code:
insert into dbinfo.test1(c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11) values ("$1",sysdate,"$3","$4","$5","$6","$7","$8","$9","$10","$11");

Hope it helps. Let us know if you need further help.
This User Gave Thanks to gacanepa For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parameter passing

Hallo everyone, This is my problem below: /home/cerebrus/pax=>vat class2.sh ksh: vat: not found /home/cerebrus/pax=>cat class2.sh #!/bin/ksh set -x bdf|grep appsdev|awk '{ print $5 }'> class3 dd={cat class3} echo $dd /home/cerebrus/pax=> /home/cerebrus/pax=>./class2.sh + bdf +... (8 Replies)
Discussion started by: kekanap
8 Replies

2. Programming

Passing parameter to makefile?

Hi, How to pass parameter to makefile? Please let me know if any one knows and also please put an example of makefile with this feature. thanks, Manju. (3 Replies)
Discussion started by: manju_p
3 Replies

3. Shell Programming and Scripting

wrong parameter passing!

Hi all I have a script which will take input as filename and passes it to a java program. It is as follows -------------------------------- FILENAME=$1 echo $FILENAME ${JAVA_HOME}/bin/java -cp DateProvider $FILENAME ------------------------------------------------- when I execute the same... (2 Replies)
Discussion started by: malle
2 Replies

4. Shell Programming and Scripting

Passing asterisk As A Parameter

I have written a Shell Script Program which accepts 3 parameters as shown below: ./calc 20 + 2 in the above line ./calc is the Shell Script itself with 3 parameters, namely: 20 + and 2. Well, now let's look inside the Script: result=$1$2$3 echo $result The output will be as... (8 Replies)
Discussion started by: indiansoil
8 Replies

5. Shell Programming and Scripting

Parameter Passing problem

Hi All, I developed a KSH script which will accept two parameters as input. These two parameters are some directories paths. In the script i am validating the number of paramaters it received as below #-------------------------------------- # Check Command line arguments... (8 Replies)
Discussion started by: Raamc
8 Replies

6. Shell Programming and Scripting

Passing parameter in quotes

Hi, PW='/as sysdba'; export PW in other module I call sqlplus ${PW} (this line I unable to change!) How I can define PW so that sqlplus calls PW in quotes i.e sqlplus '/as sysdba' I tried like this PW="'/as sysdba'"; export PW - no luck Thanks in advance (2 Replies)
Discussion started by: zam
2 Replies

7. Shell Programming and Scripting

Positional parameter passing

Hi All, When passing parameters to a sheel script, the parameters are referenced by their positions such as $1 for first parameter, $2 for second parameter. these positional values can only have values ranging from $0-$9 (0,1,2,3...9). I have a shell script meant to accept 20 parameters. for... (3 Replies)
Discussion started by: ogologoma
3 Replies

8. Shell Programming and Scripting

Passing a parameter to AWK

Hi All, I am trying to pass a parameter to AWK on my KSH shell prompt as below. var1=2 echo $var1 awk -v var2=${var1} '{print var2}' testfile.txt I am passing the input file (testfile) to awk to get some o/p. It is having 10 records. When I run AWK, it is throwing the following errors... (1 Reply)
Discussion started by: Raamc
1 Replies

9. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

10. Shell Programming and Scripting

Passing parameter through file

Hi , I am passing date parameter through file my shell script testing.sh is #set -x #set -v asd=$1 asd1=$2 echo $asd echo $asd1 Passing parameter as below sh testing.sh `cat file1.txt` Output (2 Replies)
Discussion started by: kaushik02018
2 Replies
HTMLSPECIALCHARS_DECODE(3)						 1						HTMLSPECIALCHARS_DECODE(3)

htmlspecialchars_decode - Convert special HTML entities back to characters

SYNOPSIS
string htmlspecialchars_decode (string $string, [int $flags = ENT_COMPAT | ENT_HTML401]) DESCRIPTION
This function is the opposite of htmlspecialchars(3). It converts special HTML entities back to characters. The converted entities are: &amp;, &quot; (when ENT_NOQUOTES is not set), &#039; (when ENT_QUOTES is set), &lt; and &gt;. PARAMETERS
o $string - The string to decode. o $flags - A bitmask of one or more of the following flags, which specify how to handle quotes and which document type to use. The default is ENT_COMPAT | ENT_HTML401. Available $flags constants +--------------+---------------------------------------------------+ |Constant Name | | | | | | | Description | | | | +--------------+---------------------------------------------------+ | | | | ENT_COMPAT | | | | | | | Will convert double-quotes and leave single- | | | quotes alone. | | | | | | | | ENT_QUOTES | | | | | | | Will convert both double and single quotes. | | | | | | | |ENT_NOQUOTES | | | | | | | Will leave both double and single quotes uncon- | | | verted. | | | | | | | | ENT_HTML401 | | | | | | | Handle code as HTML 4.01. | | | | | | | | ENT_XML1 | | | | | | | Handle code as XML 1. | | | | | | | | ENT_XHTML | | | | | | | Handle code as XHTML. | | | | | | | | ENT_HTML5 | | | | | | | Handle code as HTML 5. | | | | +--------------+---------------------------------------------------+ RETURN VALUES
Returns the decoded string. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.4.0 | | | | | | | The constants ENT_HTML401, ENT_XML1, ENT_XHTML | | | and ENT_HTML5 were added. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 A htmlspecialchars_decode(3) example <?php $str = "<p>this -&gt; &quot;</p> "; echo htmlspecialchars_decode($str); // note that here the quotes aren't converted echo htmlspecialchars_decode($str, ENT_NOQUOTES); ?> The above example will output: <p>this -> "</p> <p>this -> &quot;</p> SEE ALSO
htmlspecialchars(3), html_entity_decode(3), get_html_translation_table(3). PHP Documentation Group HTMLSPECIALCHARS_DECODE(3)
All times are GMT -4. The time now is 12:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy