10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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)
Discussion started by: geomarine
8 Replies
2. Shell Programming and Scripting
Hi all,
I'm using below code
processId=`sqlplus -s ${sysuser}/${syspwd} <<CHK_PROCESS
whenever sqlerror exit sql.sqlcode;
set head off feedback off echo off pages 0
SELECT PROCESS_ID FROM LSHADMIN.DATA_DOMAIN WHERE DOMAIN_NAME = '${tabname}'
... (8 Replies)
Discussion started by: Pratiksha Mehra
8 Replies
3. Shell Programming and Scripting
Hi
I have run out of ideas as to why this select doesn't work in a script I am writing.
The script sources a file of common functions and I am trying to use a select statement within one of the functions -
PS3="Try? "
select X in CONT EXIT; do
if ]
... (4 Replies)
Discussion started by: steadyonabix
4 Replies
4. Programming
Hello,
Can anyone tell me that,
How can I assign variable to shell script variable, which i need to use in INSERT INTO statement?
my shell script variables are,
EMPNAME=`regular expression`
EMPID=`regular expression`
EMPBDATE=`regular expression`
Now through ksh script I am... (16 Replies)
Discussion started by: Poonamol
16 Replies
5. Shell Programming and Scripting
Hello All,
I am new to shell scripting. I am working on Solaris O/S, bash script and sybase programming.
I want to loop through multiple values in an array and for each value, I
want to select a row from the database.
following is the code written for it.
output="loop.csv" ... (8 Replies)
Discussion started by: arundhati_s
8 Replies
6. Shell Programming and Scripting
i want to select a variable created and use it in a if statement, but not getting the desired results
LINE='device for 0101a01: lpd://172.25.41.111:515'
prt=`echo $LINE | awk '{print $3 }' | cut -c 1-7`
echo $prt
My if statement to select just what i want..
IFS=$":"
while read prt... (11 Replies)
Discussion started by: ggoliath
11 Replies
7. Shell Programming and Scripting
hi
I have two tables in oracle DB and am using a joining query which will result in the output as follows.
i need to assign it to a two dimensional array and use it for my further calculations.
the way i tried is as follows.
#!/bin/ksh
export... (1 Reply)
Discussion started by: aemunathan
1 Replies
8. Shell Programming and Scripting
Hi there
I have a database on a remote box and i have been using shell script to insert data into it for example, i could have a script that did this
SN=123456
n=server1
m=x4140
sql="UPDATE main SET hostname='$n',model='$m' WHERE serial='$SN';"
echo $sql |/usr/sfw/bin/mysql -h... (4 Replies)
Discussion started by: hcclnoodles
4 Replies
9. UNIX and Linux Applications
If I recall, when I used informix I could do a sql statement like:
SELECT Value from Table WHERE ID in (100,200,300);
How do I do this in Oracle? I believe I am using Oracle 10 if that matters.
Thanks. (1 Reply)
Discussion started by: benefactr
1 Replies
10. Windows & DOS: Issues & Discussions
Hi,
I have a UNIX script which calls SQL Select statement:
Now i want to use the output of that select statement within my UNIX script so as to call different shell script depending upon the output of the select statement.
Can anyone help me in this regard.
TIA
Akhil Goel (4 Replies)
Discussion started by: akhilgoel9
4 Replies