The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to append file contents at server1 to another file in server2 aemunathan Shell Programming and Scripting 2 06-16-2009 06:35 AM
Append value in a file sfaqih Shell Programming and Scripting 4 11-03-2008 03:31 AM
Trying to empty file using > but the file size increasing when next append firdousamir UNIX for Dummies Questions & Answers 4 06-23-2008 04:37 AM
How to append to the file? vinay123 Shell Programming and Scripting 9 06-16-2008 04:20 PM
Append a field to the end of each line of a file based on searching another file. ultimate Shell Programming and Scripting 2 03-29-2005 11:21 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-29-2009
LRoberts LRoberts is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 87
Append log file through ssh

Hello....

I am attempting to append a master log file with the contents of log files that are contained on about 7 servers.


Code:
#!/bin/sh
> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG
######################################################################
# Server Delphin / OS: Solaris
######################################################################
/lcl/bin/ssh delphin "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Angel / OS: Solaris
######################################################################
/lcl/bin/ssh angel "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Kraken / OS: Solaris
######################################################################
/lcl/bin/ssh kraken "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Prowler / OS: Solaris
######################################################################
/lcl/bin/ssh prowler "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Bluemarron / OS: Linux
######################################################################
/lcl/bin/ssh bluemarron "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Penguinshrimp / OS: Linux
######################################################################
/lcl/bin/ssh penguinshrimp "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Leviathan / OS: Solaris
######################################################################
/lcl/bin/ssh leviathan "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

However when I try the above I get....

Code:
cannot execute [Permission denied]

I am not sure why. These servers are listed in the .shosts file and I am able to ssh to them just fine. Now the master file I am attempting to append is on our NAS. Not sure if that maybe is the issue.

---------- Post updated at 10:20 AM ---------- Previous update was at 10:18 AM ----------

DUH! Helps if I use more. ;-) Just noticed.
Bits Awarded / Charged to LRoberts for this Post
Date User Comment Amount
07-02-2009 otheus posting own solution 500
 

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 04:38 AM.


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