03-04-2010
Ksh..
Quote:
Originally Posted by
TonyLawrence
Do it with Perl, not a shell script.
See examples at my
Perl Net::FTP
Hi Tony,
Thanks for ur reply..I am not working with Perl..I need it in ksh only
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
im using bourne shell
In file scriptA i add a new function, test_return()
test_return()
{
a=1
return $a
}
when i try execute ,
a='/''/scriptA test_return
echo $a
its give me error..
scriptA: cannot return when not in function
ist any solution for this problem..
How... (1 Reply)
Discussion started by: neruppu
1 Replies
2. Shell Programming and Scripting
I have a automated FTP script that gets a file using mget. I am using mget because the date will change on the file frequently. The mget works, however if I incorrectly type the file (e.g. if I want to get /dog123 and I enter /dg*) I do not receive and error code from in the FTP session. The... (1 Reply)
Discussion started by: dog123
1 Replies
3. Shell Programming and Scripting
Hi all,
I have two ksh scripts
#sample1.sh
#!/bin/ksh
. ./sample2.sh
echo $fileExist
#sample2.sh
#!/bin/ksh
func()
{
i=1
return $a
}
func
echo $?
Here how should I return the value of sample2.sh back to sample1.sh?
Thanks in advance. (2 Replies)
Discussion started by: gp_singh
2 Replies
4. Shell Programming and Scripting
Hello, I wanted to delete all files which are placed 14 days back. Here is my below script. My script works very well and it deletes all files 14 days back.
I wanted to display message incase if the delete script is not successful. The below script returns always successful. But the directory... (6 Replies)
Discussion started by: govindts
6 Replies
5. Shell Programming and Scripting
HI ,
Is there any way to return a value of variable from shell to perl script.
Code:
===
Perl file
my $diff1=system("sh diff.sh");
my $diff2=system("sh diff1.sh");
I need exit status of below commands
i.e 0 and 1 respectively.
Since in both the cases diff is working so system... (3 Replies)
Discussion started by: srkelect
3 Replies
6. Shell Programming and Scripting
Hi,
I need to edit a shell script which is calling another shell script. At the moment the program returns to the command prompt after executing each called script. I need to change it to make it return to the calling script so that the user is able to make another choice to execute the next... (11 Replies)
Discussion started by: PTL
11 Replies
7. Shell Programming and Scripting
Hi,
Im new to DB2.
I need to connect to DB2 from shell script and return the query output back to shell script variable.
this is my code
#!/bin/ksh
db_name=db
db_user=usr
db_pwd=pwd
db2 <<EOSQL
connect to $db_name user $db_user using "$db_pwd"
select count(1) from table
quit
EOSQL ... (3 Replies)
Discussion started by: sup
3 Replies
8. Shell Programming and Scripting
Hi All,
There are 2 scripts A and B.
A --> It will invoke script B
B -->
It will generate below output.
100 - connected
105 - Not Connected
210 - Connected
I want to return this value to script A. Please advice. (4 Replies)
Discussion started by: Girish19
4 Replies
9. Shell Programming and Scripting
Hi, I need to send the return code from a script to the parent shell script.
But i am suppressing outputs while calling the child script.
Is there any way still to get the return code from the child script with suppress output.
Below is my script:
I am using :$ while calling return.sh... (5 Replies)
Discussion started by: usrrenny
5 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I'm new to unix and I have a requirement to execute a shell script and get the return code/Exit code and send it in email. Meaninig we execute a script which in turn execute a shel script and fetches it\s return code and send it to email. I tried the code below as :
... (2 Replies)
Discussion started by: midhun3108
2 Replies
LEARN ABOUT DEBIAN
net::trac::connection
Net::Trac::Connection(3pm) User Contributed Perl Documentation Net::Trac::Connection(3pm)
NAME
Net::Trac::Connection - Connection to a remote Trac server
DESCRIPTION
This class represents a connection to a remote Trac instance. It is required by all other classes which need to talk to Trac.
SYNOPSIS
use Net::Trac::Connection;
my $trac = Net::Trac::Connection->new(
url => 'http://trac.example.com',
user => 'snoopy',
password => 'doghouse'
);
ACCESSORS
url
The url of the Trac instance used by this connection. Read-only after initialization.
user
password
ACCESSORS
/ MUTATORS
logged_in [BOOLEAN]
Gets/sets a boolean indicating whether or not the connection is logged in yet.
mech [MECH]
Gets/sets the Net::Trac::Mechanize (or subclassed) object for this connection to use. Unless you want to replace it with one of your own,
the default will suffice.
METHODS
new PARAMHASH
Creates a new Net::Trac::Connection given a paramhash with values for the keys "url", "user", and "password".
ensure_logged_in
Ensures this connection is logged in. Returns true on success, and undef on failure. Sets the "logged_in" flag.
PRIVATE METHODS
_fetch URL
Fetches the provided relative URL from the Trac server. Returns undef on an error (after "warn"ing) and the content
("$self-"mech->content>) on success.
_warn_on_error URL
Checks the last request for an error condition and warns about them if found. Returns with a TRUE value if errors occurred and a FALSE
value otherwise for nicer conditionals.
_tsv_to_struct PARAMHASH
Takes a paramhash of the keys "data" Given TSV data this method will return a reference to an array.
LICENSE
Copyright 2008-2009 Best Practical Solutions.
This package is licensed under the same terms as Perl 5.8.8.
perl v5.12.3 2009-06-10 Net::Trac::Connection(3pm)