03-24-2011
We can't tell why it's not working without more information. Any error messages, etc would be good. And of course the perl code itself.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a very basic script that essentially sends a log file, via FTP, to a backup server. My cron entry to run this every night is:
55 23 * * * /usr/bin/archive_logs
The script runs perfectly when executed manually, and actually worked via cron for about three weeks. However, it mysteriously... (3 Replies)
Discussion started by: cdunavent
3 Replies
2. HP-UX
Hello All,
I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir.
rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed.
Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies
3. Shell Programming and Scripting
Hi,
I am using below piece of code to get the size of the remote file.
$ftp->cwd($destination) or $error=$ftp->message;
if(!$error)
{
$ftp->put($file) or $error=$ftp->message;
print "FTP size = \n";
... (3 Replies)
Discussion started by: FarooqOnline
3 Replies
4. Programming
Dear community,
I'm driving crazy with a strange issue.
I have a simple script to transfer a file to a remote system:#!/bin/bash
echo "put /tmp/server.log" > /tmp/server1_transfer.sftp
sftp -b /tmp/server1_transfer.sftp user@10.99.1.2:Between client and server there is a SSH KEY, so if I run... (15 Replies)
Discussion started by: Lord Spectre
15 Replies
5. Shell Programming and Scripting
I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes
CC=`which gcc`
CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies
6. Shell Programming and Scripting
Hi,
On linux i have the below command working fine.
grep -o '<name>.*</name>' deploy.tmp | sed 's/\(<name>\|<\/name>\)//g' deploy.tmp
But the same is failing on Solaris
uname -a
SunOS mymac 5.10 Generic_150400-23 sun4v sparc sun4v
Can you tell me how can i get it work on Solaris ?... (6 Replies)
Discussion started by: mohtashims
6 Replies
7. Shell Programming and Scripting
On linux i have the below command working fine.
awk '/<app-deploy>/{A=1;++i} /<\/app-deploy>/{print >> "found"i".tmp";A=0} A{;print >> "found"i".tmp"}' deploy.xml
But the same is failing on Solaris
Output:
awk: syntax error near line 1
awk: bailing out near line 1
uname -a SunOS mymac 5.10... (5 Replies)
Discussion started by: mohtashims
5 Replies
8. Shell Programming and Scripting
Hi,
On Linux i get the desired ouput:
echo "<value>WEB_USER</value>" | sed 's/\(<value>\|<\/value>\)//g'Output:
Executing the same command on Solaris:
echo "<value>WEB_USER</value>" | sed 's/\(<value>\|<\/value>\)//g'Output:
I need to get the desired output on Solaris i.e. WEB_USER and... (4 Replies)
Discussion started by: mohtashims
4 Replies
9. Shell Programming and Scripting
Hi,
I am looking for a generic find command that works on both Linux and Solaris.
I have the below command that works fine on Linux but fails on solaris.find /web/config -type f '(' -name '*.txt' -or -name '*.xml' -name '*.pro' ')' Fails on SunOS mysolaris 5.10 Generic_150400-61 sun4v sparc... (1 Reply)
Discussion started by: mohtashims
1 Replies
10. Shell Programming and Scripting
I wish to replace "\\n" with a single white space.
The below does the job on command-line:
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
LEARN ABOUT OSX
cpanplus::hacking
CPANPLUS::Hacking(3pm) Perl Programmers Reference Guide CPANPLUS::Hacking(3pm)
NAME
CPANPLUS::Hacking - developing CPANPLUS
DESCRIPTION
This document attempts to describe how to develop with the CPANPLUS environment most easily, how certain things work and why.
This is basically a quick-start guide to people who want to add features or patches to CPANPLUS.
OBTAINING CPANPLUS
Checkout CPANPLUS from its GIT repository at https://github.com/jib/cpanplus-devel <https://github.com/jib/cpanplus-devel> .
INSTALLING CPANPLUS
CPANPLUS follows the standard perl module installation process:
perl Makefile.PL
make
make test
make install
CONFIGURING CPANPLUS
When running "perl Makefile.PL" you will be prompted to configure. If you have already done so, and merely wish to update the "Makefile",
simply run:
perl Makefile.PL JFDI=1
This will keep your configuration intact. Note however, if there are changes to the default configuration file "Config.pm-orig", you should
either delete your current config file and reconfigure, or patch your config file from the new entries in "Config.pm-orig".
RUNNING CPANPLUS FROM DEVELOPMENT ENVIRONMENT
If you'd rather not install the development version to your "site_perl" directory, that's no problem. You can set your "PERL5LIB"
environment variable to CPANPLUS' "lib" directory, and you can run it from there.
RUNNING CPANPLUS TESTS
Tests are what tells us if CPANPLUS is working. If a test is not working, try to run it explicitly like this:
perl -I/path/to/cpanplus/lib t/XX_name_of_test.t 1
The extra '1' makes sure that all the messages and errors (they might be errors we're testing for!) are being printed rather than kept
quiet. This is a great way to find out the context of any failures that may occur.
If you believe this test failure proves a bug in CPANPLUS, the long output of the test file is something we'd like to see alongside your
bug report.
FINDING BUGS
Sometimes you might find bugs in CPANPLUS' behaviour. If you encounter these in a development snapshot, we'd appreciate a complete patch
(as described below in the "SENDING PATCHES" section.
If it's way over your head, then of course reporting the bug is always better than not reporting it at all. Before you do so though, make
sure you have the latest development snapshot, and the bug still persists there. If so, report the bug to this address:
bug-cpanplus@rt.cpan.org
A good "patch" would have the following characteristics:
Problem description
Describe clearly what the bug is you found, and what it should have done instead.
Program demonstrating the bug
Show us how to reproduce the bug, in a simple of a program as possible
[OPTIONAL] A patch to the test suite to test for the bug
Amend our test suite by making sure this bug will be found in this, and future versions of CPANPLUS (see "SUPPLYING PATCHES")
[OPTIONAL] A patch to the code + tests + documentation
Fix the bug, update the docs & tests. That way your bug will be gone forever :)
SUPPLYING PATCHES
Patches are a good thing, and they are welcome. Especially if they fix bugs you've found along the way, or that others have reported.
We prefer patches in the following format:
o In "diff -u" or "diff -c" format
o From the root of the snapshot
o Including patches for code + tests + docs
o Sent per mail to bug-cpanplus@rt.cpan.org
o With subject containing "[PATCH]" + description of the patch
You will always be informed if a patch is applied or rejected, and in case of rejection why that is (perhaps you can tweak the patch to
have it accepted after all).
perl v5.16.2 2012-10-11 CPANPLUS::Hacking(3pm)