Solved

Scripting Linux

Posted on 2014-09-03
6
139 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 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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 35

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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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