Solved

Scripting Linux

Posted on 2014-09-03
6
133 Views
Last Modified: 2014-09-18
How can I test that a perl script for a program is working?

Thanks
Jack
0
Comment
Question by:Jack_son_
6 Comments
 
LVL 34

Assisted Solution

by:Dan Craciun
Dan Craciun earned 167 total points
ID: 40300940
What's it supposed to do? Install/modify files/email/etc?

Look at the code and see its purpose or post it here.

HTH,
Dan
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 83 total points
ID: 40301667
you need to see that the script file is executable (has the x perm) then you need run it (by calling it by its name or by using the full path to script file) with parameters (if needed to provide parameters) and see the results.
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 83 total points
ID: 40302301
Your question is way too vague.

Without knowing what the script is supposed to do, we can't tell you the best way to test it apart from running it and seeing what happens.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 84

Assisted Solution

by:ozo
ozo earned 83 total points
ID: 40302348
How can I test that a perl script for a program is working?
You need to define what "working" means.
0
 
LVL 34

Assisted Solution

by:Dan Craciun
Dan Craciun earned 167 total points
ID: 40302421
ps aux | grep "script_name"

Open in new window

This way you'll find out if it's still working.
0
 
LVL 38

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 84 total points
ID: 40306448
Start the perl script, wait for it to complete.

Then display the scripts return code:

echo $?

If you get 0 (zero) then the script worked OK, if you get any other number then something went wrong.

But it would help if you posted:

- how you start starting that perl script
- (part of) the perl script itself
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to moveā€¦

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question