Hi Guys !
I am new to unix and want to find out how we can make sql statement data to shell script variable?
Any help/suggestion is greatly appreciated
-Chandra (1 Reply)
Hi Friends...
Please assist me to assign the result of a SQL query that results two column, to two variables.
Pls find the below code that I write for assigning one column to one variable. and please correct if anything wrong..
#! /bin/sh
no='
sqlplus -s uname/password@DBname... (4 Replies)
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
Hello,
I am writing a ksh script on an AIX system. I need to get the date and time from a file into a variable. I found the following perl script from another post on this site and modified it slightly to output the format I need:
perl -e '@d=localtime ((stat(shift)));... (4 Replies)
Hi
im trying to assign the result of the db2 command to a variable inside a shell script...
: tab_cnt=`db2 "select count(*) from syscat.tables where tabname = 'ABC' and tabschema = 'MATT01'" |head -4|tail +4|cut -c 11`
: echo $tab_cnt
when i echo im getting a blank value.. im expecting... (1 Reply)
I have the below script running for generating file from PL/SQL stored procedure. I need to declare a shell variable and then pass this to sqlplus command to pass the same as a INPUT parameter for the stored procedure. Please help to do this.
#!/bin/sh
minlimit=0
maxlimit=10
size=100
while... (0 Replies)
i have 1 file say
LogDirectory='/var/tmp/logs'
DataDirectory='/var/tmp/data'
DBUSER='scott'
now i want to access these variables in many files where
#!/bin/bash
${DBUSER} , ${DataDirectory}
are called how do i do that?
Video tutorial on how to use code tags in The UNIX and Linux... (2 Replies)
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Hi Gurus,
I have a script which assign awk output to shell variable. current it uses two awk command to assign value to two variables. I want to use one command to assign two values to two variables. I tried the code, but it does't work. kindly provide your suggestion.
current code... (2 Replies)
Discussion started by: green_k
2 Replies
LEARN ABOUT DEBIAN
gnome2::gconf::value
Gnome2::GConf::Value(3pm) User Contributed Perl Documentation Gnome2::GConf::Value(3pm)NAME
Gnome2::GConf::Value - Opaque datatype for generic values
SYNOPSIS
$client = Gnome2::GConf::Client->get_default;
$client->set($config_key,
{
type => 'string',
value => 'Hello, World',
});
print "The Meaning of Life." if ($client->get($another_key)->{value} == 42);
DESCRIPTION
"GConfValue" is a dynamic type similar to "GValue", and represents a value that can be obtained from or stored in the configuration
database; it contains the value bound to a key, and its type.
In perl, it's an hashref containing these keys:
type
The type of the data. Fundamental types are 'string', 'int', 'float' and 'bool'. Lists are handled by passing an arrayref as the
payload of the "value" key:
$client->set($key, { type => 'string', value => 'some string' });
$client->set($key, { type => 'float', value => 0.5 });
$client->set($key, { type => 'bool', value => FALSE });
$client->set($key, { type => 'int', value => [0..15] });
Pairs are handled by using the special type 'pair', and passing, in place of the "value" key, the "car" and the "cdr" keys, each
containing an hashref representing a GConfValue:
$client->set($key, {
type => 'pair',
car => { type => 'string', value => 'some string' },
cdr => { type => 'int', value => 42 },
});
This is needed since pairs might have different types; lists, instead, are of the same type.
value
The payload, containing the value of type "type". It is used only for fundamental types (scalars or lists).
car, cdr
Special keys, that must be used only when working with the 'pair' type.
SEE ALSO Gnome2::GConf(3pm), Gnome2::GConf::Entry(3pm), Gnome2::GConf::Schema(3pm), Gnome2::GConf::ChangeSet(3pm).
METHODS
integer = $value_a->compare ($value_b)
o $value_b (value)
Since: gconf 2.13
string = $value->to_string
SEE ALSO
Gnome2::GConf
COPYRIGHT
Copyright (C) 2003-2006 by the gtk2-perl team.
This software is licensed under the LGPL. See Gnome2::GConf for a full notice.
perl v5.14.2 2011-11-17 Gnome2::GConf::Value(3pm)