10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to run a script from crontab but the entire script (which is 70+ lines) is written in bash and I need it to run from a certain directory.
So when I run it manually I cd to /local/mnt/scr and then type ./reordersc and it works fine.
However, I want it to run from the crontab and I... (20 Replies)
Discussion started by: newbie2010
20 Replies
2. Shell Programming and Scripting
Hi,
I want to write a script that does some sort of health check on the database. It will query the database for information, some query takes long and some are quick.
For example, inside the script I will do something as below:
#!/bin/ksh
run_query_01 &
run_query_02 &... (1 Reply)
Discussion started by: newbie_01
1 Replies
3. Shell Programming and Scripting
Dear all,
I wonder if it is possible that we can run the script
from time to time..I meant, it should repeat the
sourcing of the script by itself? In my case, I need
to source this script manually from time to time,
like once in every 10 minutes.
emily, (2 Replies)
Discussion started by: emily
2 Replies
4. Shell Programming and Scripting
Hi,
Do anybody experience to write a bash script in order to kill a specific process (java) after certain time of running?
eg.
java java.jar task_run.txt
I will run a java program (java.jar) which will run a long list of process (task_run.txt) one by one.
I plan to terminate the java... (5 Replies)
Discussion started by: perl_beginner
5 Replies
5. Shell Programming and Scripting
i want to make a script for grep any lines with key word and every time (5 min)
Ex. Log in Server.
.
.
.
03-01-2012 03:07:54,924 - INFO MessageUtil - Return | Status=0 | TxID=12010300000548755292 | Message=Success
03-01-2012 03:09:13,789 - INFO MessageUtil - Return | Status=0 |... (6 Replies)
Discussion started by: ooilinlove
6 Replies
6. Shell Programming and Scripting
Hi All,
newbie here, I'm just wondering how can i know the exact running time of my script?
Please advise,
THanks, (1 Reply)
Discussion started by: nikki1200
1 Replies
7. Shell Programming and Scripting
Unix Gurus,
I have a requirement where the shell script needs to do specific tasks after certain period of time.
Daily we receive few files in a particular folder. The script does the file renaming, pass parameters to run some web services and pushes to remote FTP location.
But my... (3 Replies)
Discussion started by: shankar1dada
3 Replies
8. Emergency UNIX and Linux Support
Dear Forum experts
I have the below script which I made to run under bash shell, it runs perfectly for low records number, let us say like 100000. when I put all records (3,000,000), it's takes hours
can you please suggest anything to optimize or to run in different way :-|
{OFS="|";... (6 Replies)
Discussion started by: yahyaaa
6 Replies
9. Shell Programming and Scripting
Hi
I have a script that performs a process on a file.
I want to know how to include a function to run a batch of files?
Here is my script
#!/bin/bash
#----------------------------------------------------------------------------------------------------------------------
#This... (2 Replies)
Discussion started by: ladyAnne
2 Replies
10. Shell Programming and Scripting
Hello Everybody..
I've written the script that kick off through CRON job and kill itself by specific time.
I've start time and end time specify in env file.
i.e
START_TIME=1500 (03:00 PM)
END_TIME=0600 (06:00 AM)
It always works good if my START_TIME is before midnight and my... (4 Replies)
Discussion started by: nirav_soni
4 Replies
Test::Script(3pm) User Contributed Perl Documentation Test::Script(3pm)
NAME
Test::Script - Basic cross-platform tests for scripts
DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or
bin as is also commonly used) paths of your Perl distribution.
Further, it aims to provide this functionality with perfect platform-compatibility, and in a way that is as unobtrusive as possible.
That is, if the program works on a platform, then Test::Script should always work on that platform as well. Anything less than 100% is
considered unacceptable.
In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking
that your module won't on some platform because of the dependency.
Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform
safety.
FUNCTIONS
script_compiles
script_compiles( 'script/foo.pl', 'Main script compiles' );
The "script_compiles" test calls the script with "perl -c script.pl", and checks that it returns without error.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
Note also that the test will be run with the same perl interpreter that is running the test script (and not with the default system perl).
This will also be shown in the diagnostic output on failure.
script_runs
script_runs( 'script/foo.pl', 'Main script runs' );
The "script_runs" test executes the script with "perl script.pl" and checks that it returns success.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
The test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also
be shown in the diagnostic output on failure.
SUPPORT
All bugs should be filed via the bug tracker at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script>
For other issues, or commercial enhancement and support, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
prove, <http://ali.as/>
COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.10.1 2009-11-24 Test::Script(3pm)