10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone!
Some time ago, I had to check connectivity with a big list of hosts, using different formats (protocol://server:port/path/, server:port, ....).
I developed a script that checks the connectivity using different commands (ping, telnet, nc, curl).
It worked for me so I'm sharing it... (9 Replies)
Discussion started by: Fr3dY
9 Replies
2. Shell Programming and Scripting
Hi, i am to linux/unix,i am using AIX 5.3. i want to connect sybase database through shell script, when i used "isql", it throws error "isql not found",
Do i need to install/configure anything, if yes please tell me how
kindly help me on this (4 Replies)
Discussion started by: venkatraman
4 Replies
3. Shell Programming and Scripting
Hello,
I have a requirement to check the tcp network connectivity between server it's running on and the list of host's and ports combination.
i have written the below code but it doesn't work, but when i execute the nc command outside the script it works fine.
please help me where i am... (8 Replies)
Discussion started by: sknovice
8 Replies
4. Shell Programming and Scripting
Helo Experts,
I have an issue in connecting to sybase from UNIX.
PFB, my code :
#!/bin/ksh
###############################################################################
#
# Filename: docflo_split.sh
#
# Description:docflo_split.sh WrapperScript splits the temporary file... (1 Reply)
Discussion started by: Nits
1 Replies
5. Shell Programming and Scripting
check the connectivity of the DBs through script, script should exit if no connection and display the output as below.
connectivity for DB1 is OK
connectivity for DB2 is OK
connectivity for DB3 is FAILED
for DB in 1 2 3
do
(sqlplus -s... (5 Replies)
Discussion started by: only4satish
5 Replies
6. Shell Programming and Scripting
Hi ,
I am able to connect to sybase using the below script ,but i want to check the status of the connectivity like if there is any network failure during downloading the file ,it will come out with exit 1 status .Any help on this ?
# isql database_name db_user_name <<EOF
select date_val from... (0 Replies)
Discussion started by: mohan705
0 Replies
7. Shell Programming and Scripting
This past weekend I had some issues with my ISP.
So for future purpose I'm going to have some logging on my internet so I'm able to attach log files to my complaint email if this issue reoccurs.
Decided to do a simple ping script that runs every 5 or 10 min with crontab
if ping fail write date... (5 Replies)
Discussion started by: chipmunken
5 Replies
8. Shell Programming and Scripting
So, first and foremost, I'm having issues with my internet connection. Periodically, the connection drops across the network. The fix is simple enough: restart the modem. However, this gets old when the connection dies out every hour.
I can hit my surfboard on 192.168.100.1, and navigate to a... (5 Replies)
Discussion started by: kungfujoe
5 Replies
9. Shell Programming and Scripting
I want to write a script to check if a unix box say abc.tdc.cin.net can be connected or not on certain port say 22. right know i have to telnet them manually from DOS prompt and if it is successful then isay it is connected.
Also to check Database connectivity I am using tnsping From DOS prompt.... (3 Replies)
Discussion started by: kukretiabhi13
3 Replies
10. Shell Programming and Scripting
Hi All,
I was able to connect to sybase in shell script and also able to run few sql queries, something like this,
#!/usr/bin/ksh -x
temp=`echo "select name from sysobjects where type = 'U'"`
results=`isql -SDS_SERVER-UAdhocUser -Pha12 <<EOF
set rowcount 6
$temp
go
EOF`
line_count=0... (1 Reply)
Discussion started by: arvindcgi
1 Replies
Test::Script(3) User Contributed Perl Documentation Test::Script(3)
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.16.3 2009-11-24 Test::Script(3)