Calling perl script from Pinnacle

312 views
Skip to first unread message

Mihaly Simon

unread,
Jul 26, 2013, 8:31:24 AM7/26/13
to pinnacl...@googlegroups.com
Hi listers,

I want to call an external perl script from Pinnacle with SpawnCommand. I have to create the command every time the script is executed, because it passes the current patient directory as an argument to the perl script. So my concatenated command looks like: `perl 1.1.7.pl /pinnacle_patient_expansion/NewPatients/Institiotion_....`
When I run this command from xterm it is fine, but from Pinnacle gives me an error message: `Playback Script, Unable to open`

Do you know the reason, why is the different outcome?
I tried to add the perl script to the system path, but I am not sure if this is the problem.

Thanks in advance

Mihaly




Wyatt Smith

unread,
Jul 26, 2013, 2:46:37 PM7/26/13
to pinnacl...@googlegroups.com
Hi Mihaly,

1)  In these situations, first I will check file permissions on the perl script to ensure that it is readable and executable.

2)  perl should already be in the "system path" so it will not need to be added.  For custom scripts that you want to be able to execute system wide, I typically put inside the /home/p3rtp/bin folder.  This path is typically specified by default in the path statement as well.  To check from xterm, type echo $PATH. 

3)  The SpawnCommand should look like "/path/to/script/location/1.1.7.pl /pinnacle_patient_expansion/NewPatients/Institiotion_....".  It is not necessary or customary to invoke with perl command.  The reason is the first line of any shell script is the Shabang!.  This specifies which command interpreter to use when processing the script.  The first line the perl script should look something like 
#!/bin/perl
and a bash script starts
#!/bin/bash
etc...
You just need to execute the script and the specified command interpreter will be used.

I suspect the different outcome is again related to permissions, either in regard to the file or the command shell.

Hope this helps
-WS
 

--
--
You received this message because you are subscribed to the Google
Groups "pinnacle3-users" group.
To post to this group, send email to pinnacl...@googlegroups.com
To subscribe to this group, send email to
pinnacle3-us...@googlegroups.com
To unsubscribe from this group, send email to
pinnacle3-use...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pinnacle3-users?hl=en
 
---
You received this message because you are subscribed to the Google Groups "pinnacle3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pinnacle3-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Derrick Larson

unread,
Jul 26, 2013, 9:17:58 AM7/26/13
to pinnacl...@googlegroups.com

With my perl scripts I first make them executable with chmod command.  In a text editor I will then create a simple file that uses the SpawnCommand to start my script.

SpawnCommand = “path to perl script/filename”

Then I use a HotScripts to point to that file where the SpawnCommand lives. That’s how I do it.  Probably can be condensed, but it works.

 

Derrick

--
--
You received this message because you are subscribed to the Google
Groups "pinnacle3-users" group.
To post to this group, send email to pinnacl...@googlegroups.com
To subscribe to this group, send email to
pinnacle3-us...@googlegroups.com
To unsubscribe from this group, send email to
pinnacle3-use...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pinnacle3-users?hl=en
 
---
You received this message because you are subscribed to the Google Groups "pinnacle3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pinnacle3-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



Confidentiality Notice: This message is intended only for the
use by the person(s) it is addressed to. This message may
contain privileged or confidential information protected by
state and federal laws. All recipients are hereby notified that
inadvertent or unauthorized receipt does not waive such
privilege and unauthorized dissemination, distribution, or
copying of this communication is prohibited. If you have
received this message in error, please destroy this message
and the attached document(s) and notify the sender.

Mihaly Simon

unread,
Jul 30, 2013, 8:36:46 AM7/30/13
to pinnacl...@googlegroups.com


Hi,

Problem solved, by setting the right path /home/p3rtp/bin and get rid of the trailing carriage returns coming from Windows line ending.

Thank you for the help.

mihaly
Reply all
Reply to author
Forward
0 new messages