Sponsored Content
Full Discussion: splitting a zip file
Top Forums UNIX for Dummies Questions & Answers splitting a zip file Post 302345814 by McGuywer on Thursday 20th of August 2009 09:40:31 AM
Old 08-20-2009
Thanx, that's a handy command.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unzip .zip file and list the files included in the .zip archive

Hello, I am trying to return the name of the resulting file from a .zip archive file using unix unzip command. unzip c07212007.cef7081.zip Archive: c07212007.cef7081.zip SecureZIP for z/OS by PKWARE inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00 I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies

2. AIX

ZIP multiple files and also specify size of zip file

I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created. How we can achieve this in UNIX? I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies

3. UNIX for Dummies Questions & Answers

Zip a file with .zip extension.

Hi, I need to zip a .dat file with .zip extension. I tried using the "zip" command. But shell says. "ksh: zip: not found" Currently I am using gunzip to zip and changing the extension ".gz" to ".zip" as follows. mv $file `echo $file | sed 's/\(.*\.\)gz/\1zip/'` But when I tried... (1 Reply)
Discussion started by: aeroticman
1 Replies

4. UNIX for Advanced & Expert Users

Zip file inside Zip file(s)

I've a zip file called Z00.zip and in that file there are 22 more zip files. Each zip file having .txt files nearly 10,000 files. I am trying to unzip all these .txt files in one command line to unzip each .zip file from Z00.zip file. Would like to know whether possible to unzip all sub-zip files... (1 Reply)
Discussion started by: nvkuriseti
1 Replies

5. Shell Programming and Scripting

Zip Multiple files to One .zip file in AIX system

Hi I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want. One I do .zip file, I should be able to unzip in my local Computer. Here is example what I want... (9 Replies)
Discussion started by: RAMA PULI
9 Replies

6. Shell Programming and Scripting

Splitting XML file on basis of line number into multiple file

Hi All, I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom. from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
Discussion started by: ajju
14 Replies

7. Shell Programming and Scripting

Shell script to filter records in a zip file that contains matching columns from another file

Not sure if this is the correct forum for this question. I have two files. file1.zip, file2 Input: file1.zip col1, col2 , col3 a , b , 0:0:0:0:0:c436:9346:d40b x, y, 0:0:0:0:0:880:39f9:c9a7 m, n , 0:0:0:0:0:80c7:9161:fe00 file2.txt col1 c4:36:93:46:d4:0b... (1 Reply)
Discussion started by: anil.v
1 Replies

8. UNIX for Beginners Questions & Answers

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies

9. Shell Programming and Scripting

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies

10. Shell Programming and Scripting

Splitting a text file into smaller files with awk, how to create a different name for each new file

Hello, I have some large text files that look like, putrescine Mrv1583 01041713302D 6 5 0 0 0 0 999 V2000 2.0928 -0.2063 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 5.6650 0.2063 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 3.5217 ... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
aliased(3)						User Contributed Perl Documentation						aliased(3)

NAME
aliased - Use shorter versions of class names. VERSION
0.30 SYNOPSIS
# Class name interface use aliased 'My::Company::Namespace::Customer'; my $cust = Customer->new; use aliased 'My::Company::Namespace::Preferred::Customer' => 'Preferred'; my $pref = Preferred->new; # Variable interface use aliased; my $Customer = alias "My::Other::Namespace::Customer"; my $cust = $Customer->new; my $Preferred = alias "My::Other::Namespace::Preferred::Customer"; my $pref = $Preferred->new; DESCRIPTION
"aliased" is simple in concept but is a rather handy module. It loads the class you specify and exports into your namespace a subroutine that returns the class name. You can explicitly alias the class to another name or, if you prefer, you can do so implicitly. In the latter case, the name of the subroutine is the last part of the class name. Thus, it does something similar to the following: #use aliased 'Some::Annoyingly::Long::Module::Name::Customer'; use Some::Annoyingly::Long::Module::Name::Customer; sub Customer { return 'Some::Annoyingly::Long::Module::Name::Customer'; } my $cust = Customer->new; This module is useful if you prefer a shorter name for a class. It's also handy if a class has been renamed. (Some may object to the term "aliasing" because we're not aliasing one namespace to another, but it's a handy term. Just keep in mind that this is done with a subroutine and not with typeglobs and weird namespace munging.) Note that this is only for "use"ing OO modules. You cannot use this to load procedural modules. See the Why OO Only? section. Also, don't let the version number fool you. This code is ridiculously simple and is just fine for most use. Implicit Aliasing The most common use of this module is: use aliased 'Some::Module::name'; "aliased" will allow you to reference the class by the last part of the class name. Thus, "Really::Long::Name" becomes "Name". It does this by exporting a subroutine into your namespace with the same name as the aliased name. This subroutine returns the original class name. For example: use aliased "Acme::Company::Customer"; my $cust = Customer->find($id); Note that any class method can be called on the shorter version of the class name, not just the constructor. Explicit Aliasing Sometimes two class names can cause a conflict (they both end with "Customer" for example), or you already have a subroutine with the same name as the aliased name. In that case, you can make an explicit alias by stating the name you wish to alias to: use aliased 'Original::Module::Name' => 'NewName'; Here's how we use "aliased" to avoid conflicts: use aliased "Really::Long::Name"; use aliased "Another::Really::Long::Name" => "Aname"; my $name = Name->new; my $aname = Aname->new; You can even alias to a different package: use aliased "Another::Really::Long::Name" => "Another::Name"; my $aname = Another::Name->new; Messing around with different namespaces is a really bad idea and you probably don't want to do this. However, it might prove handy if the module you are using has been renamed. If the interface has not changed, this allows you to use the new module by only changing one line of code. use aliased "New::Module::Name" => "Old::Module::Name"; my $thing = Old::Module::Name->new; Import Lists Sometimes, even with an OO module, you need to specify extra arguments when using the module. When this happens, simply use "Explicit Aliasing" followed by the import list: Snippet 1: use Some::Module::Name qw/foo bar/; my $o = Some::Module::Name->some_class_method; Snippet 2 (equivalent to snippet 1): use aliased 'Some::Module::Name' => 'Name', qw/foo bar/; my $o = Name->some_class_method; Note: remember, you cannot use import lists with "Implicit Aliasing". As a result, you may simply prefer to only use "Explicit Aliasing" as a matter of style. alias() my $alias = alias($class); my $alias = alias($class, @imports); alias() is an alternative to "use aliased ..." which uses less magic and avoids some of the ambiguities. Like "use aliased" it "use"s the $class (pass in @imports, if given) but instead of providing an "Alias" constant it simply returns a scalar set to the $class name. my $thing = alias("Some::Thing::With::A::Long::Name"); # Just like Some::Thing::With::A::Long::Name->method $thing->method; The use of a scalar instead of a constant avoids any possible ambiguity when aliasing two similar names: # No ambiguity despite the fact that they both end with "Name" my $thing = alias("Some::Thing::With::A::Long::Name"); my $other = alias("Some::Other::Thing::With::A::Long::Name"); and there is no magic constant exported into your namespace. The only caveat is loading of the $class happens at run time. If $class exports anything you might want to ensure it is loaded at compile time with: my $thing; BEGIN { $thing = alias("Some::Thing"); } However, since OO classes rarely export this should not be necessary. Why OO Only? Some people have asked why this code only support object-oriented modules (OO). If I were to support normal subroutines, I would have to allow the following syntax: use aliased 'Some::Really::Long::Module::Name'; my $data = Name::data(); That causes a serious problem. The only (reasonable) way it can be done is to handle the aliasing via typeglobs. Thus, instead of a subroutine that provides the class name, we alias one package to another (as the namespace module does.) However, we really don't want to simply alias one package to another and wipe out namespaces willy-nilly. By merely exporting a single subroutine to a namespace, we minimize the issue. Fortunately, this doesn't seem to be that much of a problem. Non-OO modules generally support exporting of the functions you need and this eliminates the need for a module such as this. EXPORT
This modules exports a subroutine with the same name as the "aliased" name. BUGS
There are no known bugs in this module, but feel free to email me reports. SEE ALSO
The namespace module. THANKS
Many thanks to Rentrak, Inc. (http://www.rentrak.com/) for graciously allowing me to replicate the functionality of some of their internal code. AUTHOR
Curtis Poe, "ovid [at] cpan [dot] org" COPYRIGHT AND LICENSE
Copyright (C) 2005 by Curtis "Ovid" Poe This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available. perl v5.16.2 2013-08-25 aliased(3)
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy