Sponsored Content
Top Forums Shell Programming and Scripting Passing parameter more than 9 Post 302829979 by sankar on Sunday 7th of July 2013 03:54:06 PM
Old 07-07-2013
Oracle [Solved] Passing parameter more than 9

Hi,

I've written a script where eleven parameter to be passed from command line
which is inserting into an oracle table,

it is working but the tenth and 11th parameter are not accepting as given
it is referring to 1st parameter.

HERE IS THE SCRIPT
Code:
#!/bin/ksh
#set -o

echo $*
sqlplus -s /nolog <<ENDOFSQL
connect dbinfo/dbinfo123@dbtrac1t;

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');
commit;

ENDOFSQL

CALLING THE SCRIPT AS >>>>>>>>>>>
Code:
. ./insert-test.sh one two three four five 06 seven eight nine ten eleven

HERE IS WHAT IT IS INSERTING INTO THE TABLE............NOTE 10TH and 11TH COLUMN VALUE
Code:
SQL> select * from dbinfo.test1 order by 2;

C1         C2                             C3    C4    C5                 C6 C7    C8         C9         C10        C11
---------- ------------------------------ ----- ----- ---------- ---------- ----- ---------- ---------- ---------- ----------
one        07-JUL-13 12.58.38.000000 PM   three four  five                6 seven eight      nine       one0       one1
one        07-JUL-13 01.00.28.000000 PM   three four  five                6 seven eight      nine       one0       one1
one        07-JUL-13 01.02.34.000000 PM   three four  five                6 seven eight      nine       one0       one1

any help is appreciated...........

Last edited by Scott; 07-07-2013 at 05:53 PM.. Reason: Use code tags, please...
 

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
INPUT(5)							File Formats Manual							  INPUT(5)

NAME
input - input data file format DESCRIPTION
This manual page describes the output format of the file created by the Yagi-Uda project input or first programs. The file is an ASCII file, so can be edited manually if required. It is read by yagi or optimise. The program optimise also creates the same file format. NOTES FREQUENCY MIN_FREQUENCY MAX_FREQUENCY STEP_FREQUENCY ELEMENTS DRIVEN PARASITIC ANGULAR_STEP DATA_DRIVEN DATA_PARASITIC The # is used as a comment. A typical file, for an antenna designed for the 2m amateur band (144-146 MHz) might be as shown below. Note: 1) Reflector is at position 0.0 2) All elements lengths/positions are in m. NOTES This line can be up to 400 characters. FREQUENCY 145.000000 MIN_FREQUENCY 144.000000 MAX_FREQUENCY 146.000000 STEP_FREQUENCY 0.100000 ELEMENTS 10 DRIVEN 1 PARASITIC 9 ANGULAR_STEP 180.000000 #DATA_DRIVEN x y length diameter voltage phase DATA_DRIVEN 0.30993 0.000000 1.002492 0.0063000000000000 1.000000 0.000000 # DATA_PARASITIC x y length diameter DATA_PARASITIC 0.00000 0.00000 1.01902 0.00630 0.49859 0.00000 0.95551 0.00630 1.07338 0.00000 0.93595 0.00630 1.81020 0.00000 0.92050 0.00630 2.58152 0.00000 0.91322 0.00630 3.30390 0.00000 0.91243 0.00630 4.03692 0.00000 0.90423 0.00630 4.64108 0.00000 0.89081 0.00630 5.37418 0.00000 0.83912 0.00630 FILES
filename ASCII description of antenna. filename.out binary file SEE ALSO
yagi(1), output(1), input(1), optimise(1), first(1) and yagi(5). AUTHORS
Dr. David Kirkby G8WRB (david.kirkby@onetel.net), with help with converting to DOS from Dr. Joe Mack NA3T (mack@fcrfv2.ncifcrf.gov). Yagi version 1.16 24th October 2000 INPUT(5)
All times are GMT -4. The time now is 12:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy