I am writing my first udev rule.
Hi all,
I want to use a variable inside my sql query and below is my script:
Code:
#!/bin/ksh
export b="abcd"
a=`sqlplus -s abc/def@ghi <<++
set heading off;
set feedback off;
select xxx from mytable where clmn_nm='$b';
exit;
++`
echo $a
But the output i get is below:
Code:
$> sh sqltry.sh
$>
I am not able to figure out why the query is not taki
The only calculator I know is bc. I want to add 1 to a variable, and output to another variable.
I got the nextnum variable from counting string in a file:
nextnum=`grep -o stringtocount file.tpl.php | wc -w`
Lets say the nextnum value is 1. When added with 1, it will become 2.
Hello Everyone,
I am trying to resolve a variable inside another variable.Let me go straight to the example.
Code:
Input:
Query=$Table_1 Join $Table_2
(Query itself is a variable here)
Now for two different cases I am assigning different values to Table_1 and Table_2
Code:
Case 1:
Table_1=tbl1_c1
Table_2=tbl2_c1
After this I want to write a command here so that when I
Hi,
I am trying to get the oracle variables and pass the values in sql placed in procedure.
VARIABLE
vstat='ASDS,FGDS,VCGD,VCXC'
Query :
select distinct dept from College
where section in ('C','D')
AND CODES =''
AND NAMES IN ('RAJ','SAM');
I want CODES values to be taken from vstat variable one by one in loop .
Here 4 values are passed seperated with comma.
I need to deal with two pieces of custom hardware which both send debugging data over two serial connections. Those serial connections go through two serial-to-USB converters. The serial-to-USB devices have the same vendor numbers, device numbers, and, apparently, the same serial numbers.
Here's the issue: I want to log the two serial ports separately.
Per Greg's Wiki the IFS variable is used:
In the read command, if multiple variable-name arguments are
specified, IFS is used to split the line of input so that each
variable gets a single field of the input.
When performing WordSplitting on an unquoted expansion, IFS is used
to split the value of the expansion into multiple words.
Anyone knows how to set variable in TCL ?
let say i have a password variable and it will have different values.
set variable
and variable has different values like:
xxxx
yyyy
zzzz
in a bash script, How do I get a variable's content, from the contents of another variable, both variable names have the same trailing number?
IP1=192.168.0.17
DIR1=/mnt/2tb/archive/src/
IP2=192.168.0.11
DIR2=~/src/
IP3=192.168.0.113
DIR3=~/src/
#get local ip and set variable HOST to local ip
HOST=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
# get HOST