Solved

Scripting Linux

Posted on 2014-09-03
6
130 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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 37

Accepted Solution

by:
Gerwin Jansen 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ubuntu/Asterisk after upgrade Wav issue 19 54
LINUX CENTOS + APACHE 9 60
i can not do linux commands in cygwin windows 10 6 59
nagios 4 php error after installation 6 70
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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 how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

932 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

16 Experts available now in Live!

Get 1:1 Help Now