[nmglug] [Fwd: [dt-general] DigiTemp rrdb]
Nick Frost
nickf at nickorama.com
Mon Dec 7 13:55:00 PST 2009
a wrote:
>
> Can anyone give me an specific example of where and how the script
> should be placed and then run.
>
PERL is an interpreted (not compiled) language, like Python.
So, you can put a PERL script anywhere and point it at the PERL you want
to use. For example;
nickf at nickf-desktop:/tmp$ which perl
/usr/bin/perl
perl --version
This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
> ./hello.pl
> hello,world
> nickf at nickf-desktop:/tmp$ cat hello.pl
> #!/usr/bin/perl
>
> print "hello,world\n";
or you can run perl on the command line and feed it a script.
Sounds like you want to run a script, I'd say put in in;
/usr/local/<scriptname>
or in /opt or in /usr/local/bin/
doesn't really matter. You can use cron to run the script at intervals,
unless you run a script that has interval loops and does constant output
(I have a Python script that does this).
And yes, the perms should be 700 or 755 on your script (i.e. it should
be executable by the user running it).
ls -al hello.pl
-rwx------ 1 nickf nickf 40 2009-12-07 14:50 hello.pl
Hope that helps,
-Nick
--
----------------------------------------
Nicholas S. Frost
7 Avenida Vista Grande #325
Santa Fe, NM 87508
nickf at nickorama.com
----------------------------------------
More information about the nmglug
mailing list