Solved

Scripting Linux

Posted on 2014-09-03
6
127 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 84

Assisted Solution

by:ozo
ozo earned 83 total points
Comment Utility
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
Comment Utility
ps aux | grep "script_name"

Open in new window

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

Accepted Solution

by:
Gerwin Jansen earned 84 total points
Comment Utility
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 Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
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.:

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now