Search Results

Search: Posts Made By: Rajesh Putnala
10,503
Posted By guruprasadpr
Hi Just open a same sql session like you...
Hi

Just open a same sql session like you had one for the select statement and so something like this:


sqlplus -s xxxx/xxxx@$ORACLE_SID $a $b $c <<EOF
SET HEADING OFF
SET SERVEROUTPUT ON...
6,408
Posted By itkamaraj
i am not sure about the sqlplus. may be you...
i am not sure about the sqlplus.

may be you can include set for echo off and linesize


set echo off
set linesize 150
45,603
Posted By ahamed101
There should not be any space between ret and =...
There should not be any space between ret and = and yet you still have it!
Copy patse this!

ret=`sqlplus -s /nolog << EOF
connect $db_user/$db_pwd@$db_sid;
SPOOL output.txt;
set...
45,603
Posted By ahamed101
which is your OS? If solaris, please use nawk ...
which is your OS? If solaris, please use nawk
Also, please use the updated code!

--ahamed
45,603
Posted By smilesavvy
awk '/OrdAcctCycChg/ {print...
awk '/OrdAcctCycChg/ {print $1,substr($3,length($3),1)}' inputfile | while read a b
do
echo $a #your first variable value
echo $b #your second variable value
done
45,603
Posted By itkamaraj
nawk '{print $1,substr($3,length($3),1)}'...
nawk '{print $1,substr($3,length($3),1)}' inputfile | while read a b
do
echo $a #your first variable value
echo $b #your second variable value
done
3,473
Posted By radoulov
Yes, now that it works, you don't need the trace...
Yes, now that it works, you don't need the trace information no more.
Just remove set -xv from the beginning.
3,473
Posted By radoulov
You need to assign values to these variables: ...
You need to assign values to these variables:

db_user
db_pwd
db_sid
3,627
Posted By clx
I didn't understand. The solution can be fit to...
I didn't understand.
The solution can be fit to your requirement. you can off course adjust/re-use it to match with.

If you are sure the last character would always be a digit and want to pass...
2,759
Posted By malcomex999
awk -F\| '{for(i=0;++i<=NF;) if($i ~ /Acct/)...
awk -F\| '{for(i=0;++i<=NF;) if($i ~ /Acct/) print substr($i,6)}' infile--
2,759
Posted By michaelrozar17
Did you try Sed or other awk solutions..? grep...
Did you try Sed or other awk solutions..?
grep -oE '[0-9]{9,}' inputfile # assuming minimum of 9 digits for Acc numbers
2,759
Posted By michaelrozar17
Simple grep solution grep -o 'Acct [0-9]*'...
Simple grep solution
grep -o 'Acct [0-9]*' inputfile
# Or through Sed
sed -n 's/.*Acct \([0-9][0-9]*\).*/\1/p' inputfile
2,759
Posted By malcomex999
Expecting your file is a plain text so try...
Expecting your file is a plain text so try this...

awk -F\| '{for(i=0;++i<=NF;) if($i ~ /Acct/) print $i}' infile
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 04:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy