Im using a bash script and calling a ksh script. Below is the output
which will get a summary of the last 24 hours of logged error. Im
getting the same debugging result if I do it in the host where the
korn script is. However the result is different, if I trigger the
script outside of the host, the file.out was not overwritten but if
executed within the host, the file.out is overwritten which my desired
result.


On 2/1/07, andrelst <[EMAIL PROTECTED]> wrote:
thad,

run this and check the output. the -x prints commands and arguments
for debugging purposes and get back to us what's the output.

ssh ${HOST} 'bash -x /var/report/erreport.sh'

or

ssh ${HOST} 'ksh -x /var/report/erreport.sh'

or

replace bash/ksh on whatever shell you are using.

--
regards,
Andre | http://www.varon.ca


On 2/1/07, thad <[EMAIL PROTECTED]> wrote:
> I have this snippet in from my script that will call or execute using
> ssh in trusted hosts another script. The erreport.sh has an initial
> function that will delete the previous errorlog.out.  However, the
> next line which verify the timestamp of the output script, shows
> result that the old file was not overwitten or no new  output  got
> created. What would be the better way of doing this?  This script
> produced the desired ouput if executed on cli at its host.
>
>  ssh ${HOST} '/var/report/erreport.sh'
>  ssh ${HOST} 'ls -la /var/report/errlog.out `hostname`' >> 
$BASE_DIR/UP_${FILE}
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
plug@lists.linux.org.ph (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph



--
sometimes truth is stranger than fiction
-bad religion-
http://www.bloglines.com/blog/mailist
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
plug@lists.linux.org.ph (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to