Sponsored Content
Full Discussion: uncompress a file and ftp
Top Forums Shell Programming and Scripting uncompress a file and ftp Post 302338234 by namishtiwari on Tuesday 28th of July 2009 03:54:03 AM
Old 07-28-2009
I can see in my perl modules that these files are there, but still when i ran the script i got these erros--

Code:
Can't locate auto/Compress/Raw/Zlib/autosplit.ix in @INC (@INC contains: C:/Perl
/lib C:/Perl/site/lib .) at C:/Perl/lib/AutoLoader.pm line 160.
 at C:/Perl/lib/Compress/Raw/Zlib.pm line 6
Can't locate loadable object for module Compress::Raw::Zlib in @INC (@INC contai
ns: C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/lib/IO/Uncompress/RawInflate.pm l
ine 8
Compilation failed in require at C:/Perl/lib/IO/Uncompress/RawInflate.pm line 8.

BEGIN failed--compilation aborted at C:/Perl/lib/IO/Uncompress/RawInflate.pm lin
e 8.
Compilation failed in require at C:/Perl/lib/IO/Uncompress/Unzip.pm line 11.
BEGIN failed--compilation aborted at C:/Perl/lib/IO/Uncompress/Unzip.pm line 11.

Compilation failed in require at ftp1.pl line 3.
BEGIN failed--compilation aborted at ftp1.pl line 3.

i have the required files in perl/lib i cross checked but still the error persistes. I want to get rid of these errors.

Thanks
NT

---------- Post updated at 10:51 AM ---------- Previous update was at 10:23 AM ----------

Hi,
I want to clear what exactly i am doing here..

I wrote the above perl script to get the files in a specifed directory called temp. The files which i get all are zipped ones. I want to unzip all the files and choose some which of my interest and delete rest of the files. I achieved the first part but i am struglling for the second.

The files which i am getting after ftp are like this--

tali05_Jul122009_2358.zip
tali05_Jul122009_4567.zip
tali05_Jul122009_9876.zip

I want to unzip all these files after getting them. When we unzip these files we get files like--

nt123_12Jul09_13_05_23.log
ntrf_12Jul09_14_35_33.log

and many more like this.. I want to keep only the first one and delete the second file.

Kindly help me in achieving this.

Thanks
NT

---------- Post updated 07-28-09 at 03:54 AM ---------- Previous update was 07-27-09 at 10:51 AM ----------

Hi Experts,

Any ideas how i can modify my script to get the desired result as mentioned in the thread..


Thanks
NT
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to uncompress .zip file?

Hi all, Can anyone tell me what tools / command can use to uncompress those *.zip file in HP-UX, thx. Bgds, Gordon (7 Replies)
Discussion started by: fonggo
7 Replies

2. Shell Programming and Scripting

ftp/Uncompress error.

I am getting a 'corupt index' error when I uncompress a file that has been ftped to HP-UX server from a Solaris box. I am actually ftp about 5 files and am able to Uncompress 4 of the files however I get a 'Corrupt Index' error when one of the fifth file is being Uncompressed. Any help :confused: (2 Replies)
Discussion started by: oracle8
2 Replies

3. UNIX for Dummies Questions & Answers

How to get to a file and uncompress it

I did an ftp to copy a tar file from a main server area to the backup server area. I need to get that tar file to uncompress it in backup server. How do I go about it. Please any suggesstion will be greatly appreciated (1 Reply)
Discussion started by: nkem22
1 Replies

4. UNIX Desktop Questions & Answers

file zip,rar,tar,compress,uncompress,unzip,unrar

i want know how to compress and uncompress file using unix, compress uncompress,zip,unzip,rar,unrar,how its work and more about this.:confused: (1 Reply)
Discussion started by: ismael xavier
1 Replies

5. UNIX for Advanced & Expert Users

Using FTP to check whether file is completely FTP... plz find the description below

Hi, We have some clients who will place huge files in to one of the remote server. And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients. My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies

6. Shell Programming and Scripting

Compress in UNIX ftp the uncompress in windows server

Hi all, I need a shell script that will compress all the files in the UNIX box say /output/foldre/OUT/*.out. 1. I need to compress all the .out files present in this path. 2. The compressed files shuld be FTPed to Windows server say C:\Myfiles 3. Then the FTPed files should be... (3 Replies)
Discussion started by: Codesearcher
3 Replies

7. Programming

Uncompress a gzip and bzip file using java on unix solaris environment

Hi, I need to uncompress a gzip and bzip file using java on unix solaris environment. I also need to retreive the header information of the file inorder to differentiate between gzip and bzip file. Please help Pooja (0 Replies)
Discussion started by: wadhwa.pooja
0 Replies

8. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

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

9. Shell Programming and Scripting

Uncompress and ftp a file

i have a compressed file, i need to ftp this file to remote server. while ftp i should uncompress and send, but the uncompressed file shouldn't write in the local server file system. is there any options how to do this using a named pipes in ftp?? greatly appreciate your suggestions? Thanmks (2 Replies)
Discussion started by: Fakru.y
2 Replies

10. UNIX for Dummies Questions & Answers

scp and uncompress on the file?

Hi, Is there any way to do scp and uncompress on the fly? At the moment, I am doing scp and then running uncompress of the .Z files in the background. I am wanting to be able to do scp and then have the uncompress the .Z file in the background. Any advice much appreciated. Thanks in... (3 Replies)
Discussion started by: newbie_01
3 Replies
FindBin(3perl)						 Perl Programmers Reference Guide					    FindBin(3perl)

NAME
FindBin - Locate directory of original perl script SYNOPSIS
use FindBin; use lib "$FindBin::Bin/../lib"; or use FindBin qw($Bin); use lib "$Bin/../lib"; DESCRIPTION
Locates the full path to the script bin directory to allow the use of paths relative to the bin directory. This allows a user to setup a directory tree for some software with directories "<root>/bin" and "<root>/lib", and then the above example will allow the use of modules in the lib directory without knowing where the software tree is installed. If perl is invoked using the -e option or the perl script is read from "STDIN" then FindBin sets both $Bin and $RealBin to the current directory. EXPORTABLE VARIABLES
$Bin - path to bin directory from where script was invoked $Script - basename of script from which perl was invoked $RealBin - $Bin with all links resolved $RealScript - $Script with all links resolved KNOWN ISSUES
If there are two modules using "FindBin" from different directories under the same interpreter, this won't work. Since "FindBin" uses a "BEGIN" block, it'll be executed only once, and only the first caller will get it right. This is a problem under mod_perl and other persistent Perl environments, where you shouldn't use this module. Which also means that you should avoid using "FindBin" in modules that you plan to put on CPAN. To make sure that "FindBin" will work is to call the "again" function: use FindBin; FindBin::again(); # or FindBin->again; In former versions of FindBin there was no "again" function. The workaround was to force the "BEGIN" block to be executed again: delete $INC{'FindBin.pm'}; require FindBin; KNOWN BUGS
If perl is invoked as perl filename and filename does not have executable rights and a program called filename exists in the users $ENV{PATH} which satisfies both -x and -T then FindBin assumes that it was invoked via the $ENV{PATH}. Workaround is to invoke perl as perl ./filename AUTHORS
FindBin is supported as part of the core perl distribution. Please send bug reports to <perlbug@perl.org> using the perlbug program included with perl. Graham Barr <gbarr@pobox.com> Nick Ing-Simmons <nik@tiuk.ti.com> COPYRIGHT
Copyright (c) 1995 Graham Barr & Nick Ing-Simmons. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 FindBin(3perl)
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy