?
Solved

Scripting Linux

Posted on 2014-09-03
6
Medium Priority
?
141 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 35

Assisted Solution

by:Dan Craciun
Dan Craciun earned 668 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 332 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 332 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
Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

 
LVL 84

Assisted Solution

by:ozo
ozo earned 332 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 35

Assisted Solution

by:Dan Craciun
Dan Craciun earned 668 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 336 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

765 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