Sponsored Content
Top Forums Shell Programming and Scripting Extract a list of files using unzip command Post 302895416 by remissssss on Monday 31st of March 2014 04:27:51 PM
Old 03-31-2014
here a quote of my terminal :

Archive: STR_SUB.zip
replace DOC.kml? [y]es, [n]o, [A]ll, [N]one, [r]ename: r
new name: STR_SUB.kml
inflating: STR_SUB.kml

Archive: ATC.zip
replace DOC.kml? [y]es, [n]o, [A]ll, [N]one, [r]ename: r
new name: ATC.kml
inflating: ATC.kml

Explaining it with words : both zipped files STR_SUB.zip and ATC.zip contain a file named DOC.kml.
When asking replace "DOC.kml?" I type "r" then the name of my zipped files + .kml (eg : ATC + . kml)

Why wouldn't it be possible to do it automatically since I got a question for each zipfile using the name of the archive ?

example : something that could copy the filename ATC in ATC.zip and paste it into ATC.kml while extracting shall be possible, right?

Maybe the unzip function mey not be appropriate to do such a thing?!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to unzip and extract tar file in single command

In order to save diskspace and avoid of disk full during unzip then extract the tar file is there any tar unzip command would unzip and extract tar at the same time (test123.tar.gz) thank in advance (6 Replies)
Discussion started by: darkrainbow
6 Replies

2. 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

3. Shell Programming and Scripting

Shell script or command help to extract specific contents from a long list of content

Hi, I got a long list of contents: >sequence_1 ASSSSSSSSSSSDDDDDDDDDDDCCCCCCC ASDSFDFFDFDFFWERERERERFSDFESFSFD >sequence_2 ASDFDFDFFDDFFDFDSFDSFDFSDFSDFDSFASDSADSADASD ASDFFDFDFASFASFASFAFSFFSDASFASFASFAFS >sequence_3 VEDFGSDGSDGSDGSDGSDGSDGSDG dDFSDFSDFSDFSDFSDFSDFSDFSDF... (2 Replies)
Discussion started by: patrick87
2 Replies

4. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

5. Solaris

Command to list or view the files in .pkg (solaris) and how to extract without installing

In Linux for .rpm we can list or view the files using the command rpm -qpl <file.rpm> and to extract, the command is rpm2cpio <file.rpm> | cpio -idvh I would like to know the commands which has same functionality as above for solaris ( .pkg) Thanks in Advance (5 Replies)
Discussion started by: frintocf
5 Replies

6. Shell Programming and Scripting

Single command - unzip files from a tar command

I have a tar file that contains multiple .Z files. Hence I need to issue a tar command followed by a gzip command to fully extract the files. How do I do it in a single command? What I'm doing now is tar xvf a.tar (this will output 1.Z and 2.Z) gzip -d *.Z (to extract 1.Z and 2.Z) (9 Replies)
Discussion started by: ericlim
9 Replies

7. Shell Programming and Scripting

Extract few content from a huge list of files

I have a huge list of files (about 300,000) which have a pattern like this. .I 1 .U 87049087 .S Am J Emerg .M Allied Health Personnel/*; Electric Countershock/*; .T Refibrillation managed by EMT-Ds: .P ARTICLE. .W Some patients converted from ventricular fibrillation to organized... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

8. UNIX for Dummies Questions & Answers

Extract .zip file without using unzip,tar

Hi, Need to extract a file containing multiple .txt files without using tar/unzip as they are not available (1 Reply)
Discussion started by: santoshdrkr
1 Replies

9. UNIX for Dummies Questions & Answers

7z command for files larger than 4GB ( unzip doesn't work)

My unzip command doesn't work for files that are greater than 4GB. Consider my file name is unzip -p -a filename.zip, the command doesn't work since the size of the file is larger. I need to know the corresponding 7z command for the same. This is my Unix shell script program: if then ... (14 Replies)
Discussion started by: chandraprakash
14 Replies

10. Shell Programming and Scripting

Unzip all the files with subdirectories present and append a part of string from the main .zip files

Hi frnds, My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on. Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies
Geo::GoogleEarth::Pluggable(3pm)			User Contributed Perl Documentation			  Geo::GoogleEarth::Pluggable(3pm)

NAME
Geo::GoogleEarth::Pluggable - Generates GoogleEarth Documents SYNOPSIS
use Geo::GoogleEarth::Pluggable; my $document=Geo::GoogleEarth::Pluggable->new(%data); #is a special Folder... my $folder =$document->Folder(%data); #isa Geo::GoogleEarth::Pluggable::Folder my $point =$document->Point(%data); #isa Geo::GoogleEarth::Pluggable::Point my $netlink =$document->NetworkLink(%data); #isa Geo::GoogleEarth::Pluggable::NetworkLink my $lookat =$document->LookAt(%data); #isa Geo::GoogleEarth::Pluggable::LookAt my $style =$document->Style(%data); #isa Geo::GoogleEarth::Pluggable::Style print $document->render; KML CGI Example use Geo::GoogleEarth::Pluggable; my $document=Geo::GoogleEarth::Pluggable->new(name=>"KML Document"); print $document->header, $document->render; KMZ CGI Example use Geo::GoogleEarth::Pluggable; my $document=Geo::GoogleEarth::Pluggable->new(name=>"KMZ Document"); print $document->header_kmz, $document->archive; DESCRIPTION
Geo::GoogleEarth::Pluggable is a Perl object oriented interface that allows for the creation of XML documents that can be used with Google Earth. Geo::GoogleEarth::Pluggable (aka Document) is a Geo::GoogleEarth::Pluggable::Folder with a render method. Object Inheritance Graph -- Base --- Folder --- Document | +- Placemark -+- Point | +- LineString | +- LinearRing | +- StyleBase -+- Style | +- StyleMap | +- NetworkLink USAGE
This is all of the code you need to generate a complete Google Earth document. use Geo::GoogleEarth::Pluggable; my $document=Geo::GoogleEarth::Pluggable->new; $document->Point(name=>"White House", lat=>38.897337, lon=>-77.036503); print $document->render; CONSTRUCTOR
new my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Name"); METHODS
type Returns the object type. my $type=$folder->type; document Returns the document object. All objects know to which document they belong even the document itself! render Returns an XML document with an XML declaration and a root name of "Document" print $document->render; archive Returns a KMZ formatted Zipped archive of the XML document print $document->archive; xmlns Add or update a namespace $document->xmlns->{"namespace"}=$url; Delete a namespace delete($document->xmlns->{"xmlns:gx"}); Replace all namespaces $document->{"xmlns"}={namespace=>$url}; Reset to default namespaces delete($document->{"xmlns"}); nextId This method is in the document since all Styles and StyleMaps are in the document not folders. my $id=$document->nextId($type); #$type in "Style" or "StyleMap" header, header_kml Returns a header appropriate for a web application Content-type: application/vnd.google-earth.kml+xml Content-Disposition: attachment; filename=filename.xls $document->header #embedded in browser $document->header(filename=>"filename.xls") #download prompt $document->header(content_type=>"application/vnd.google-earth.kml+xml") #default content type header_kmz Returns a header appropriate for a web application Content-type: application/vnd.google-earth.kml+xml Content-Disposition: attachment; filename=filename.xls $document->header_kmz #embedded in browser $document->header_kmz(filename=>"filename.xls") #download prompt $document->header_kmz(content_type=>"application/vnd.google-earth.kmz") #default content type TODO
Support for default Polygon and Line styles that are nicer than GoogleEarth's Support for DateTime object in the constructor that is promoted to the LookAt object. Create a GPS::Point plugin (Promote tag as name and datetime to LookAt) BUGS
Please log on RT and send to the geo-perl email list. LIMITATIONS
Not So Pretty XML The XML produced by XML::LibXML is not "pretty". If you need pretty XML you must pass the output through xmllint or a simular product. For example: perl -MGeo::GoogleEarth::Pluggable -e "print Geo::GoogleEarth::Pluggable->new->render" | xmllint --format - Write Only This package can only write KML and KMZ files. However, if you need to read KML files, please see the Geo::KML package's "from" method. SUPPORT
DavisNetworks.com supports all Perl applications including this package. AUTHOR
Michael R. Davis (mrdvt92) CPAN ID: MRDVT COPYRIGHT
This program is free software licensed under the... The BSD License The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
Geo::KML, XML::LibXML, XML::LibXML::LazyBuilder, Archive::Zip, IO::Scalar perl v5.14.2 2011-06-25 Geo::GoogleEarth::Pluggable(3pm)
All times are GMT -4. The time now is 06:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy