The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-26-2008
Amresh Dubey Amresh Dubey is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 7
help ssh

My below code is erroring out and i am not able to fix it.. could any one help please.

SERVER="ABCdb01"
USER="ABC"
OUT="out_${USER}@${SERVER}.log"

typeset -x ARG=$1

print -u2 "OK :log = ${OUT}"
print -u2 " "
print -u2 "${SERVER} with user ${USER}"

ORACLE_SID="ABC"
DBCOMM="\". ./.profile; sqlplus -s \"/as sysdba\""
shut_db () {
ssh ${USER}@${SERVER} ${DBCOMM} << EOF
shutdown abort
startup restrict
shutdown immediate
EOF"

return $?
}
  #2 (permalink)  
Old 02-27-2008
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
What is the error that you are getting? No way to suggest fixes unless we get that detail. Also, can you feed input to 'ssh' that way? Perhaps you should copy over a script that does what you are doing into /tmp on the remote system and then just execute the script through ssh.
Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0