UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 21st, 2006, 07:49 AM
itsmeavi itsmeavi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 7 itsmeavi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 16 m 40 sec
Reputation Power: 0
`<<' is not matched.

m trying to connect to oracle through Unix shell scripting however i m getting this error message "`<<' is not matched. " can anybody help me out for the same....


Code:
# Createion Date: 21-Jul-2006
# Modification Date:
# Version: 1.0
####################################################################
##############################################################
# Check the parameter
##############################################################
if [ "${#}" -lt 5 -o "${#}" -gt 5 ]
then
echo "Usage for this script is : <Start Month> <End Month> <DB_Name> <DB_User>
<DB_Password>"
exit 1
fi
if [ "${#}" -eq 5 ]
then
start_month=$1
end_month=$2
db_nm=$3
db_usr=$4
db_pwd=$5
fi
while [ "$start_month" -ne "$end_month" ]
do
echo $start_month
sqlplus -s $db_usr/$db_pwd@db_nm <<END
print -p "select * from dual;"
exit
END
$start_month=`eval start_month + 1`
done> 

Reply With Quote
  #2  
Old July 22nd, 2006, 08:32 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 20 m 49 sec
Reputation Power: 48
The error is in this block - the here document
Code:
sqlplus -s $db_usr/$db_pwd@db_nm <<END
print -p "select * from dual;"
exit
END

1. move the << over one poistion to the left.
2. make SURE there is no character in front of END. ie., it is in the firs position.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > `<<' is not matched.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT