Your commandline arguments show up in the script as "$1", "$2", etc. If you have more than 9 arguments ($1..$9) you must use "shift" to get all of them.
There is also a special variable "$#", which holds the number of passed arguments and "$*" which holds all passed arguments.
shift will make $9 to $8, ..., $2 to $1 and lose the previous content of $1. $9 which is freed this way will hold the 10th passed argument if there is one.
Here is a little demonstration script to show you the mechanism:
With these mechanisms you should be able to not only put your arguments into your SQL-Statements, but also validate your script to recognize too few/too many or syntaktically wrong arguments.
Hi,
I need to put this command in a batch shell.
sqlplus -s user/password @test.sql
and in the test.sql I have this command
select * from pbempl where pebempl_id = $1;
How I can pass the variable $1 from the batch shell???
Thanks (2 Replies)
Hi my UNIX Friends,
Im calling some SQL scripts through Unix Shell scripting.
How do I export the value of PL/SQL variable value into a Unix shell script variable?
Also could any one inform me about the 'search' and 'cut' utility of PL/SQL
(like 'grep' and 'cut' in Shell scripting).
... (10 Replies)
Dear Friends,
Please help me to achieve the following:
I want to pass one parameter from Shell-script to Sql-script.
Example:
My ShellScript.sh is calling report.sql like this:
/bin/sqlplus /reports.sql
And
My report.sql is calling many Stored-Procedures like this:
exec... (0 Replies)
Hi guyz,
Posting a thread after a long time.
I want to pass two variables to unix shell script from sql script.
Note: I am calling sql script from unix script. sql script has 2 variables one is the return code for status of program run and second one email flag. I don't know how to capture... (3 Replies)
Unix prompt
=========
echo "Enter the query"
read q
==========
User has entered :
SELECT * FROM employee
=====================
Now the problem starts..
echo $q
Output: SELECT "all files names in the PWD" FROM employee
================================================
... (5 Replies)
Hi Gurus,
i have one requirement in unix script, i have a file called abc.txt in that few lines are there with the empid, i need to read each line and pass to .sql script.
ex:
abc.txt
2345
2346
1243
1234
i need to pass these arguments to .sql script rom unix
ex:
select * from... (1 Reply)
Hi, hope everyone are fine. Please find my issue below, and I request your help in the same
In a configuration file, i have a variable defined as below
TEST = 'One','Two','Three'
I am trying to pass this variable in to a sql script which is define in a pl/sql block
as follows,
In the... (1 Reply)
Hi all,
I am executing shell script in which I am using SQLLDR
In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to spool in another text file. Currently I have given this in script file as following
Spool... (2 Replies)
Hello,
Here is the code i have written to get the count of a plsql query back to the unix.
function checkforCOIDs
{
countcheck=`sqlplus -s $1/$2@$3
whenever oserror exit sql.oscode rollback
whenever sqlerror exit sql.sqlcode rollback
set serverout on size 2000;
set head off feedback off... (2 Replies)
OS Solaris 10,
DB oracle 10g
Hello,
We currently have a BASH script that runs and moves image files from a remote server to the local db server. A snippet of the code shows that we are picking up all Images that are 'mtime -1'
some code...
for file in `ssh user@10.200.200.10 'find... (3 Replies)
Discussion started by: JonP
3 Replies
LEARN ABOUT ULTRIX
conjure
conjure(1) General Commands Manual conjure(1)NAME
conjure - interprets and executes scripts written in the Magick Scripting Language (MSL).
SYNOPSIS
conjure [options] script.msl
OVERVIEW
The conjure program is a member of the ImageMagick(1) suite of tools. Use it to process a Magick Scripting Language (MSL) script. The Mag-
ick scripting language (MSL) will primarily benefit those that want to accomplish custom image processing tasks but do not wish to program,
or those that do not have access to a Perl interpreter or a compiler.
For more information about the conjure command, point your browser to file:///usr/share/doc/packages/ImageMagick/www/conjure.html or
http://www.imagemagick.org/script/conjure.php.
DESCRIPTION
Image Settings:
-monitor monitor progress
-quiet suppress all warning messages
-regard-warnings pay attention to warning messages
-seed value seed a new sequence of pseudo-random numbers
-verbose print detailed information about the image
Miscellaneous Options:
-debug events display copious debugging information
-help print program options
-log format format of debugging information
-list type print a list of supported option arguments
-version print version information
In additiion, define any key value pairs required by your script. For example,
conjure -size 100x100 -color blue -foo bar script.msl
SEE ALSO ImageMagick(1)COPYRIGHT
Copyright (C) 1999-2010 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file:///usr/share/doc/pack-
ages/ImageMagick/www/license.html or http://www.imagemagick.org/script/license.php
ImageMagick Date: 2009/01/10 01:00:00 conjure(1)