ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
68160
|
Tue Oct 27 11:03:49 2015 |
| kenzo Abrahams | kenzoabrahams@gmail.com | Question | Linux | 3.1.1 | running more then one shell command when new entries is submitted |
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo |
68161
|
Tue Oct 27 11:14:16 2015 |
| kenzo Abrahams | kenzoabrahams@gmail.com | Question | Linux | 3.1.1 | Re: running more then one shell command when new entries is submitted |
The reason why im asking if it can be done using the Execute option is because I need to have the message id of the entry that was submitted and in an external script i dont have access to the variable
kenzo Abrahams wrote: |
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo
|
|
68163
|
Tue Oct 27 11:23:36 2015 |
| kenzo Abrahams | kenzoabrahams@gmail.com | Question | Linux | 3.1.1 | Re: running more then one shell command when new entries is submitted |
If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into it. When I use Execute with one command and pipe its output to a file everything works fine though.
Stefan Ritt wrote: |
The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which you can try yourself by entering for example: ls *.c; ls*.h
kenzo Abrahams wrote: |
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo
|
|
|
68170
|
Wed Oct 28 11:11:27 2015 |
| kenzo Abrahams | kenzoabrahams@gmail.com | Question | Linux | 3.1.1 | Re: running more then one shell command when new entries is submitted |
Hi Andreas
This worked perfectly thank you.
Andreas Luedeke wrote: |
As far as I know ELOG is recognising a configuration line as a comment only when it starts with a ';'.
I can assure you that ELOG does not treat the rest of the line as a comment when you use a ';' within a $shell() command: I do it a lot and it works fine. Here's a simple, generic example using the bash:
Preset Author = $shell(if [ $short_name = "Anonym" ] ;then echo $Author;else echo \"$long_name, $Author\";fi)
It adds $long_name to the Author field for non-anonymous entries.
Cheers Andreas
kenzo Abrahams wrote: |
If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into it. When I use Execute with one command and pipe its output to a file everything works fine though.
Stefan Ritt wrote: |
The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which you can try yourself by entering for example: ls *.c; ls*.h
kenzo Abrahams wrote: |
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo
|
|
|
|
|
68171
|
Thu Oct 29 12:30:43 2015 |
| kenzo Abrahams | kenzoabrahams@gmail.com | Question | Linux | 3.1.1 | propogating messages through logbooks |
Hi there
Okay so let me explain what im trying to do. I have a table in a logbook (lets call it home) that the user fills
out. This information in the table is related to other logbooks (8 of them to be exact).
I want to propogate information from the table in the home logbook into the other logbooks. To do this I used
Execute new which runs my scripts. One of the scripts makes a call to the elog
client to submit the message. The problem is that this call to elog client never finishes because its hanging
waiting for the initial submit (one which triggered Execute new) to finish. The documentation
explained that only one submit can be processed at a time so i expected whats happening at the moment.
My question is are there any other ways to do what im trying to do?? In a nutshell how to propogate information
from one logbook to another autonomously.
Regards
Kenzo |
68174
|
Mon Nov 2 07:39:07 2015 |
| kenzo Abrahams | kenzoabrahams@gmail.com | Question | Linux | 3.1.1 | Re: propogating messages through logbooks |
> Hi Kenzo,
> I think it would help me to understand your problem, if you would provide a minimal configuration file with two
> logbooks.
>
> There is no ELOG internal feature to propagate data from one logbook to another;
> using a shell script is the only method I know.
> But you could easily put your script into the background:
> ELOG can handle multiple parallel request, by handling one request after the other.
>
> Kind Regards, Andreas
Hi Andreas
Im using python to do the scripting. Everything works fine until it comes to submitting the entry to my logbook.
The extractTable.py file is the one running the command to submit to elog.
I see now that im starting a subprocess in my python script (subprocess.call) and thats why its not finishing.
Could you perhaps suggest how I would go about doing this by putting my scripts in the
background? I might have to look at multiprocessing in python as well. The reason im using python is because im
doing alot of file processing as well. I do have to add that this method works perfectly when i just run the python
on its own. As soon as i run it by submiting an elog entrie from the browser it hangs on the subprocess.call method.
Regards, Kenzo |
68175
|
Mon Nov 2 08:37:06 2015 |
| kenzo Abrahams | kenzoabrahams@gmail.com | Question | Linux | 3.1.1 | Re: propogating messages through logbooks |
>
> > Hi Kenzo,
> > I think it would help me to understand your problem, if you would provide a minimal configuration file with two
> > logbooks.
> >
> > There is no ELOG internal feature to propagate data from one logbook to another;
> > using a shell script is the only method I know.
> > But you could easily put your script into the background:
> > ELOG can handle multiple parallel request, by handling one request after the other.
> >
> > Kind Regards, Andreas
>
> Hi Andreas
>
> Im using python to do the scripting. Everything works fine until it comes to submitting the entry to my logbook.
> The extractTable.py file is the one running the command to submit to elog.
> I see now that im starting a subprocess in my python script (subprocess.call) and thats why its not finishing.
> Could you perhaps suggest how I would go about doing this by putting my scripts in the
> background? I might have to look at multiprocessing in python as well. The reason im using python is because im
> doing alot of file processing as well. I do have to add that this method works perfectly when i just run the python
> on its own. As soon as i run it by submiting an elog entrie from the browser it hangs on the subprocess.call method.
>
> Regards, Kenzo
Hi Andreas
I sorted my problem out, I had to use threading in python such that I can time the submissions to the elog server.
Everything works fine now. Thank you for the assistance.
Regards
Kenzo |
66452
|
Tue Jul 21 22:29:17 2009 |
| kyle carpenter | kyle.carpenter@atmosenergy.com | Question | Windows | 2.7.6-2230 | Reply not working correct |
Hi,
I love this software. I am not a programmer but have learned alot about the program.
I have 2 questions.
1. when i do a reply it will bring the original qutes with it but i have the option to change what had been entered. once i do the reply and reply to the reply i can not change the first reply but can change the second reply. This just started last week and i am not sure what has changed. i even uninstalled and reinstalled. If I try to just the HTML i tcomes up with code? If I do elcode seems to do ok just not able to stop the editing of the the last reply. Plain seems to do the same as ELcode.
2. I have also had trouble with E-Log not starting on my XP machines. Any ideas?
Thanks for sharing such a powerful program it is sweet.
Kyle |