08-29-2006
Doing this means I have to open a new dedicated ISQL connection just to get a value from DB & set it in the Shell variable.
I already have ISQL code inside the script doing a bunch of functionalities. I believe there is not other option but was hoping that I could do something inside the existing ISQL code. Do let me know.
Thanks.
Tipsy.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to set environment variable on a remote machine. I want to do it by running a shell script
Here's what I am doin
rsh <remote-hostname> -l root "cd /opt/newclient; . ./setp.sh"
In setp.sh, I have
#############################
cd ../newlib;
export... (1 Reply)
Discussion started by: eamani_sun
1 Replies
2. Shell Programming and Scripting
Hi All-
First time using iSql.
I have 4 query files - some have more than 1 line of sql statements
After a bit of research it appears I can just use the -i command and specify the input file.
Questions:
Does it matter that there are multiple queries in each file? Do I need to have... (3 Replies)
Discussion started by: Cailet
3 Replies
3. Shell Programming and Scripting
Hi,
I am new to shell scripting.I tried adding an entry to the path variable like below
export PATH=$PATH:/opt/xxx/bin
But am getting an error invalid identifier /opt/xxx/bin
Can someone tell me the error above and correct me .
Thanks and Regards,
Padmini (2 Replies)
Discussion started by: padmisri
2 Replies
4. Shell Programming and Scripting
Hi ,
I am having one TCL TK script , I am setting some variables in the GUI TK interface
set DI 1
set MODELS_PATH /a/d/path
but I want to make ksh shell understand the variables when I am running TK script
I tried to do like this
set a
but it is not working
... (1 Reply)
Discussion started by: kshitij
1 Replies
5. Shell Programming and Scripting
isql
select count(*) from Table
eof
How to assign record count output of isql query to a shell variable ? (4 Replies)
Discussion started by: vikram3.r
4 Replies
6. Shell Programming and Scripting
Hi All,
I'm trying to write an menu driven program to automate some functions which involve loging to multiple hosts. The hosts can differ for every use, so I thought I would use an config file to get the hostnames. Now I need to set those values in the config file to environment variable to... (6 Replies)
Discussion started by: arun_maffy
6 Replies
7. Shell Programming and Scripting
Trying to put all command line arguments to the script in a variable msgst01
$* does not seem to work
set msgst01 = $* (2 Replies)
Discussion started by: kristinu
2 Replies
8. UNIX for Dummies Questions & Answers
Hi ,
I want to use shell variable in isql.
example..
$ksh ./sudh.ksh "2041qwer"
sudh.ksh is my script passing the perameter "2041qwer"
Code in my script :
===========
$SYBASE/$SYBASE_OCS/bin/isql -I$SYBASE/interfaces -S$OTHRSRVR -U$SYBUSER -P$SYBPASS -w... (1 Reply)
Discussion started by: sudhakarpasala
1 Replies
9. Shell Programming and Scripting
The following is part of a larger shell script
grep -v "Col1" my_test.log | grep -v "-" | awk '$5 == "Y" {print $1}'
instead of printing, can I set set $1 to a variable that the rest of the shell script can read?
if $5 == Y, I want to call another shell script and pass $1 as a... (2 Replies)
Discussion started by: guessingo
2 Replies
10. Shell Programming and Scripting
Hello,
I have a shell script where I am doing an isql to select some records. the result i get from the select statement is directed to an output file. I want to assign the result to a Shell variable so that I can use the retrieved in another routine.
e.g.
"isql -U${USER} -P${PASSWD} -S${SERVER}... (1 Reply)
Discussion started by: RookieDev
1 Replies
UPSRW(8) NUT Manual UPSRW(8)
NAME
upsrw - UPS variable administration tool
SYNOPSIS
upsrw ups
upsrw -h
upsrw -s variable [-u username] [-p password] ups
DESCRIPTION
upsrw allows you to view and change the read/write variables inside your UPS. It sends commands via the server upsd(8) to your driver,
which configures the hardware for you.
The list of variables that allow you to change their values is based on the capabilities of your UPS equipment. Not all models support this
feature. Typically, cheaper hardware does not support any of them. Run upsrw with a UPS identifier to see what will work for you.
OPTIONS
-h
Display the help message.
-s variable
Specify the variable to be changed inside the UPS. For unattended mode such as in shell scripts, use the format VAR=VALUE to specify
both the variable and the value, for example:
-s input.transfer.high=129
Without this argument, upsrw will just display the list of the variables and their possible values.
Some variables are strings, and can be set to any value within the length limit. Others are enumerated types and can only be set to one
of those values. Others may be within an allowed range of values. Refer to the list to know what's available in your hardware.
-u username
Set the NUT username for the connection to the server. This is optional, and you will be prompted for this when using the -s option if
you don't specify -u on the command line. NUT usernames are defined in upsd.users(5), and are not linked to system usernames.
-p password
Set the password to authenticate to the server. This is also optional like -u, and you will be prompted for it if necessary.
ups
View or change the settings on this UPS. The format for this option is upsname[@hostname[:port]]. The default hostname is "localhost".
UNATTENDED MODE
If you run this program inside a shell script or similar to set variables, you will need to specify all of the information on the command
line. This means using -s VAR=VALUE, -u and -p. Otherwise it will put up a prompt and your program will hang.
This is not necessary when displaying the list, as the username and password are not required for read-only mode.
DIAGNOSTICS
upsrw can't set variables on your UPS unless you provide a valid username and password. If you get "access denied" errors, make sure that
your upsd.users(5) has an entry for you, and that the username you are using has permissions to SET variables.
HISTORY
This program used to be called upsct2, which was ambiguous and confusing.
SEE ALSO
upsd(8), upscmd(8)
Internet resources:
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/24/2012 UPSRW(8)