Home Man
Search
Today's Posts
Register

Showing results 1 to 25 of 103
Search took 0.00 seconds.
Search: Posts Made By: palanisvr
Forum: Shell Programming and Scripting 01-02-2014
Replies: 14
Views: 2,378
Posted By palanisvr
Hope this will help. #!/bin/sh ...

Hope this will help.

#!/bin/sh
no_of_rows="1"
file_nm=new_file

if [ -f temp.dat ]
then
rm -f temp.dat
fi
Forum: UNIX for Dummies Questions & Answers 04-18-2013
Replies: 1
Views: 758
Posted By palanisvr
fetch the text_file name in a dynamic way instead...

fetch the text_file name in a dynamic way instead of hardcoding , this will solve your problem

sqlplus -s user/pwd@dbname @$text_file
Forum: UNIX for Dummies Questions & Answers 04-18-2013
Replies: 4
Views: 1,292
Posted By palanisvr
for i in `cat file` do fld1=`echo $i | tr -d...

for i in `cat file`
do
fld1=`echo $i | tr -d '[0-9]'`
fld2=`echo $i | tr -d '[a-z]' |tr -d '[A-Z]'`
echo $fld1 " " $fld2 >> tmp.txt
sort -n -k2 tmp.txt |awk -F ' ' '{print $1$2}'
rm -f tmp.txt...
Forum: UNIX for Dummies Questions & Answers 04-18-2013
Replies: 4
Views: 5,514
Posted By palanisvr
Try this ...

suppose that file content lies in a.txt

fld1=`awk -F'=' '{print $1}' a.txt|tr '\n' ','|sed s/".$"//`
fld2=`awk -F'=' '{print $2}' a.txt|tr '\n' ','|sed s/".$"//`
echo $fld1
echo $fld2
Forum: UNIX for Dummies Questions & Answers 04-18-2013
Replies: 6
Views: 1,223
Posted By palanisvr
Try this ...

for i in `cat a.txt`
do
num=`echo "$i" |awk -F',' '{print $1 "," $2}'`
for j in `echo "$i"|tr ',' '\n'|sed -n '3,$p'`
do
echo $num","$j
done
done
Forum: Shell Programming and Scripting 01-08-2012
Replies: 2
Views: 1,550
Posted By palanisvr
can you provide a sample input file and desired...

can you provide a sample input file and desired output file for the same.
Forum: Shell Programming and Scripting 01-05-2012
Replies: 6
Views: 713
Posted By palanisvr
for i in `cat num.txt` do search=`grep "$i"...

for i in `cat num.txt`
do
search=`grep "$i" data.txt`
ret_cd=$?
if [ "$ret_cd" -gt 0 ]
then
echo "Match not found ,run a command"
fi
done
Forum: Shell Programming and Scripting 01-05-2012
Replies: 29
Views: 10,906
Posted By palanisvr
Try this ..

I don't have expertise in Sybase , I am giving sample programme in Oracle to capture the error using the shell script hope this will help you.

Sample procedure : You have to make sure the created...
Forum: Shell Programming and Scripting 12-22-2011
Replies: 5
Views: 2,327
Posted By palanisvr
Try this one...

$echo Sample_ab_a.txt | sed s/.*_// | sed s/\.txt//
a
Forum: Shell Programming and Scripting 12-12-2011
Replies: 5
Views: 1,612
Posted By palanisvr
Try this

cat file.txt |tr ',' '\n' | tr -d ' '
Forum: Shell Programming and Scripting 10-05-2011
Replies: 6
Views: 8,945
Posted By palanisvr
Try this one.

$ echo "NZ-deploy-mode-1.15-Linux.x86_64.rpm" | sed 's/-1.*//'
NZ-deploy-mode
Forum: Shell Programming and Scripting 06-20-2011
Replies: 2
Views: 2,005
Posted By palanisvr
Try this ...

#capture the script request in a unix host variable from database
v_script_request==`sqlplus -s user/password@dbname <<!
set feedback off heading off pagesize 0
select REQUEST_ACTION from...
Forum: Shell Programming and Scripting 06-08-2011
Replies: 12
Views: 1,405
Posted By palanisvr
Try this.. ls -lrt Abc_Def* | sort -n

Try this..

ls -lrt Abc_Def* | sort -n
Forum: Shell Programming and Scripting 06-08-2011
Replies: 25
Views: 10,157
Posted By palanisvr
SQL loader is efficient one to load data from...

SQL loader is efficient one to load data from file.
Forum: Shell Programming and Scripting 06-08-2011
Replies: 4
Views: 1,720
Posted By palanisvr
Can you come with a example of exactly what you...

Can you come with a example of exactly what you need.
Forum: Shell Programming and Scripting 06-07-2011
Replies: 19
Views: 2,011
Posted By palanisvr
Try this

sed s/' '//g temp.txt
Forum: Shell Programming and Scripting 06-03-2011
Replies: 7
Views: 1,153
Posted By palanisvr
Try this..

head -2 infile.txt |awk -F "=" '{print $2}' | tr -d \" | tr '\n' '/'
Forum: Shell Programming and Scripting 06-03-2011
Replies: 4
Views: 1,293
Posted By palanisvr
This is how it works out. you have to open sql...

This is how it works out.
you have to open sql session by issuing proper credentials to the login db and simply execute any command , procedure vice versa.


sqlplus -s...
Forum: Shell Programming and Scripting 06-02-2011
Replies: 7
Views: 2,906
Posted By palanisvr
Please provide Inputs and output expected.

Please provide Inputs and output expected.
Forum: Shell Programming and Scripting 05-26-2011
Replies: 3
Views: 805
Posted By palanisvr
Try with this..

Code :

$cat test.fnc
v1=$1
function findRecord() {
output=`grep $v1 recordDatabase`
echo $output
}
#call function
findRecord
Forum: Shell Programming and Scripting 05-25-2011
Replies: 13
Views: 4,423
Posted By palanisvr
cat temp.txt | sed /'^$'/d cat temp.txt |...

cat temp.txt | sed /'^$'/d

cat temp.txt | grep -v '^$'
Forum: Shell Programming and Scripting 05-25-2011
Replies: 9
Views: 1,282
Posted By palanisvr
cat temp.txt | sed /'^$'/d This should...

cat temp.txt | sed /'^$'/d

This should also work :

cat temp.txt | grep -v '^$'
Forum: Shell Programming and Scripting 05-25-2011
Replies: 1
Views: 1,272
Posted By palanisvr
Try this one

#!/bin/sh
file_name="tempfile.txt"
previous_day=`TZ=GMT+24 date +%b" "%d`

file_cnt=`ls -lrt $file_name| grep "$previous_day" | wc -l`

if [ "$file_cnt" -gt 0 ]
then
echo "00000000" >...
Forum: Shell Programming and Scripting 05-25-2011
Replies: 1
Views: 3,873
Posted By palanisvr
Execute a shell script from Oracle procedure

Hi Gurus,

Want to execute a shell script from a oracle procedure and get the status of the same, any assistance in this regard will be appreciated.

proc_data.sh is script name which I want to...
Forum: Shell Programming and Scripting 05-23-2011
Replies: 4
Views: 1,210
Posted By palanisvr
Thanks a lot for your prompt and useful reply on...

Thanks a lot for your prompt and useful reply on this, will try to use these options.
Showing results 1 to 25 of 103

 


All times are GMT -4. The time now is 12:34 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password