Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 309 of 808  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  315   Fri May 2 20:10:48 2003 Reply Stefan Rittstefan.ritt@psi.chQuestion  Re: Simulation of a submit
> Is there a way to simulate an ELOG SUBMIT?

Have a look at the elog utility which comes in the package. It does exactly 
this. It "simulates" a browser and does a submit directly to elogd. So you 
can either redo the elog code somewhere, or call elog with the proper 
command line parameters to insert logbook entries.
  316   Sat May 3 11:00:34 2003 Reply Tomas Rudolftomas@mba.beQuestion  Re: Simulation of a submit
> > Is there a way to simulate an ELOG SUBMIT?
> 
> Have a look at the elog utility which comes in the package. It does exactly 
> this. It "simulates" a browser and does a submit directly to elogd. So you 
> can either redo the elog code somewhere, or call elog with the proper 
> command line parameters to insert logbook entries.

Thank you, Stefan!
  343   Sat May 17 05:55:53 2003 Question Tomas Rudolftomas@mba.beQuestion  Re: Simulation of a submit
I guess this question got somehow lost.
So once again : Is there a possibility to EDIT an existing message with 
elog.exe ?

Tomas


> > Is there a way to simulate an ELOG SUBMIT?
> 
> Have a look at the elog utility which comes in the package. It does 
exactly 
> this. It "simulates" a browser and does a submit directly to elogd. So 
you 
> can either redo the elog code somewhere, or call elog with the proper 
> command line parameters to insert logbook entries.

We did some tests of your elog utility. It does what we need except for one 
important thing: EDIT existing messages. Is there a way to edit en existing 
message? Adding a new message or replying to an existing message works fine 
but in our case we need to have the ability to modify messages that were 
created in the past.

Tomas
  356   Wed May 28 08:30:18 2003 Reply Stefan Rittstefan.ritt@psi.chQuestion  Re: Simulation of a submit
> I guess this question got somehow lost.
> So once again : Is there a possibility to EDIT an existing message with 
> elog.exe ?

This message did not get lost, but I'm on a conference right now in Elba and 
will come back next week, when I have time to answer all questions. Only so 
much for now: Editing in elog.exe is right now not implemented, but I will 
put it on the wishlist.

- Stefan
  358   Tue Jun 3 15:26:58 2003 Reply Stefan Rittstefan.ritt@psi.chQuestion  Re: Simulation of a submit
> I guess this question got somehow lost.

Got not lost, but I was on two consecutive conferences and just returned.

> So once again : Is there a possibility to EDIT an existing message with 
> elog.exe ?

Not at the moment. But I will put it on the wishlist.
  1790   Tue Apr 4 08:15:29 2006 Reply Stefan Rittstefan.ritt@psi.chRequest 2.6.1Re: Simple math within an elog form

Steve Jones wrote:
This may sound a little strange but I am trying to determine if it is possible to create a series of attributes that may be assigned an integer value via OPTIONS, and then take the selected values and perform some simple math and display the result.


This item is already on the wishlist, so I added your vote there. But due to my workload, it will certainly not be implemented in the next few weeks.
  1792   Wed Apr 5 00:00:14 2006 Reply Steve Jonessteve.jones@freescale.comRequest 2.6.1Re: Simple math within an elog form

Stefan Ritt wrote:

Steve Jones wrote:
This may sound a little strange but I am trying to determine if it is possible to create a series of attributes that may be assigned an integer value via OPTIONS, and then take the selected values and perform some simple math and display the result.


This item is already on the wishlist, so I added your vote there. But due to my workload, it will certainly not be implemented in the next few weeks.



Quote:

Ok, understood. So instead I am trying to use $shell and am running into a problem
##################################################
# Define Risk1
#
Options Risk1 = 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 


##################################################
# Define Risk2
#
Options Risk2 = 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 

##################################################
# Define Risk2
#
Options Risk3 = 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 

##################################################
# Define TotalRisk
#
Subst TotalRisk = $shell(echo $Risk1 + $Risk2 + $Risk3 > /tmp/elog_out)
#Subst TotalRisk = $shell(gawk 'BEGIN{ print $Risk1 + $Risk2 + $Risk3 }' )
#Subst TotalRisk = $shell(uname -a)

What comes out with my simple echo or gawk line is "+ + " so it looks like the attributes are not getting passed into the $shell code?
  1793   Wed Apr 5 10:07:59 2006 Reply Stefan Rittstefan.ritt@psi.chRequest 2.6.1Re: Simple math within an elog form

Steve Jones wrote:
Subst TotalRisk = $shell(echo $Risk1 + $Risk2 + $Risk3 > /tmp/elog_out)

What comes out with my simple echo or gawk line is "+ + " so it looks like the attributes are not getting passed into the $shell code?


The reason is that the substitutions get evaluated from left to right, so first the shell is called with $Risk1, and because the shell by itself does a subsitution and $Risk1 is not defined on the unix system, the shell returns an empty string, leading to "+ +" as the result.

I changed that in the current SVN version, so we have first the attribute substitions, then then shell substitution. The "echo $Risk1..." will of course not work, since it gets substituted by elog as "echo 12 + 23 + 45" (or whatever the numbers are), and the "echo" will just return these numbers without adding them. To make the shell to add things, you would need to define the risks as environment variables for the shell, so I guess the "gawk" method will work better for you. I tried it and it worked fine for me.
ELOG V3.1.5-3fb85fa6