How to pass arguments to SQL file passed in shell script?
Hi,
I am using SYBASE database. in my script i am connecting to DB via using isql.
i am taking a ABC.sql file to use the queries written in it and storing the output in the XYZ.txt
i was trying to pass arguments in this sql file but unable to do it.
i was going through the site found the command "read" that can be used.
i want to read a specific variable.
can anyone please tell me how do i use read to pass the parameter??
searching it already but unable to get the desired result.
Hi,
I have two shell variables $t1 and $t2 which I need to pass to a function in a shell script. The function will do some computation with those two variables and echo the resultant. But I do not know how to pass teh arguments.
The function written is
f1()
{......
........
}
What should... (3 Replies)
Hi,
I have a shell script called ftp.sh which is running continously in background.
I tried passing arguments to this script but it did not worked out.
Below is ftp.sh script. Please help me
case $param in
start) sleep_func "300"
echo "!ksh $scr_ddir/ftp.sh... (1 Reply)
this is my issue.
4 parameters are passed from korn shell to sql script.
parameter_1= varchar2 datatype or no value entered my user.
parameter_2= number datatype or no value entered my user.
parameter_3= number datatype or no value entered my user.
parameter_4= number datatype or no... (5 Replies)
hi,
I am new in the shell script, and c programming with linux. I am looking to pass the arguments in c program that should be executed by the shell script.
e.g.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv)
{ int i;
for (i=1;i<argc; i++)
{
... (2 Replies)
Hi all ,
I want to pass contents from a file say f1 as arguments to a sql query which has In statement using a script
example
select * from table_1 where login in ( `cat f1`) ;
will this work or is there any other way to do it. (1 Reply)
My requirement is that I want to pass similar argument to a shell script and process it in the script. Something like below:
myScript.sh -c COMPONENT1 -c COMPONENT2 -a APPNote: -c option can be specified multiple times and -a is optional parameter
I know this can be achieved using... (2 Replies)
Hello All,
Could you please help me to explain that how do I pass textboxes values while running a shell script which need some arguments while running it and should be invoked after the button click.
Here is an example.
The first CGI is:
#!/bin/ksh
echo "Content-Type: text/html"... (4 Replies)
Hi All,
I am new to shell script. I am trying to pass value from .sh file to .sql file .
But I am able to run the .sql file from .sh file with values in sql file.
But I am unable to pass the values from .sh file. can some one please help to resolve this.
here is my .sh file
s1.sh
... (4 Replies)
Hi all,
I am working on a project, in which I have to connect to Bluetooth low energy device. I am able to connect and do data transfer from command line. But I want to do from script
Here is my script
#!/bin/bash
#sudo hcitool -i hci0 lescan
sleep 1
sudo hcitool -i hci0 lecc --random... (8 Replies)
Shell Script Gurus,
I am writing a shell script which needs User ID's to pass as an Arguments in command line while executing.
Can this be doable? I've never done this, If you give a sample script that would be helpful, Thanks. (1 Reply)
Discussion started by: shekar777
1 Replies
LEARN ABOUT DEBIAN
bsqlodbc
bsqlodbc(1) FreeTDS Utilities bsqlodbc(1)NAME
bsqlodbc - batch SQL script processor using ODBC
SYNOPSIS
bsqlodbc [-U username] [-P password] [-S server] [-D database]
[-i input_file] [-o output_file] [-e error_file]
[-t field_term] [-qv]
DESCRIPTION
bsqlodbc is a utility program distributed with FreeTDS.
bsqlodbc is a non-interactive equivalent of the "isql" utility programs distributed by Sybase and Microsoft. Like them, bsqlodbc uses the
command "go" on a line by itself as a separator between batches. The last batch need not be followed by "go".
bsqlodbc makes use of the ODBC API provided by FreeTDS. This API is of course also available to application developers.
OPTIONS -U username
Database server login name.
-P password
Database server password.
-S server
Database server to which to connect.
-D database
Database to use.
-i input_file
Name of script file, containing SQL.
-o output_file
Name of output file, holding result data.
-e error_file
Name of file for errors.
-t field_term
Specifies the field terminator. Default is two spaces (' '). Recognized escape sequences are tab (' '), carriage return ('
'),
newline ('
'), and backslash ('\').
-h Print column headers with the data to the same file.
-q Do not print column metadata, return status, or rowcount. Overrides -h.
-v Verbose mode, for more information about the ODBC interaction. This also reports the result set metadata, including and return
code. All verbose data are written to standard error (or -e), so as not to interfere with the data stream.
NOTES
bsqlodbc is a filter; it reads from standard input, writes to standard output, and writes errors to standard error. The -i, -o, and -e
options override these, of course.
EXIT STATUS
bsqlodbc exits 0 on success, and >0 if the server cannot process the query.
HISTORY
bsqlodbc first appeared in FreeTDS 0.65.
AUTHORS
The bsqlodbc utility was written by James K. Lowden <jklowden@freetds.org>
doc 13 November 2011 bsqlodbc(1)