oops here is is the debug output:

+ TZ=EST29EDT
+ + date +%m/%d/%y:Time=%H:%M:%S
StartDate=02/01/07:Time=20:58:30
+ + date +%m%d%H%M%y
Yesterday=0201205807
+ TZ=EST5EDT
+ + date +%m/%d/%y:Time=%H:%M:%S
EndDate=02/02/07:Time=20:58:30
+ OFILE=errlog.out
+ echo start
+ 1> errlog.out
+ hostname
+ echo System Error log for myhost from <02/01/07:Time=20:58:30> to
<02/02/07:Time=20:58:30>
+ 1>> errlog.out
+ errpt -s 0201205807

On 2/2/07, thad <[EMAIL PROTECTED]> wrote:
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 is 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



--
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