Sponsored Content
Top Forums Shell Programming and Scripting Unpack individual files from tarball Post 302544975 by stevensw on Friday 5th of August 2011 03:06:41 PM
Old 08-05-2011
Unpack individual files from tarball

Say you don't want to unpack the whole thing, just individual files or directories within a .tgz. How to do this?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create individual tgz files from a set of files

Hello I have a ton of files in a directory of the format app.log.2008-04-04 I'd like to run a command that would archive each of these files as app.log.2008-04-04.tgz I tried a few combinations of find with xargs etc but no luck. Thanks Amit (4 Replies)
Discussion started by: amitg
4 Replies

2. Red Hat

Method to Unpack cpio files

Hi all, I want to unpack some files .Files and their sizes are: 1. Linux9i_Disk1.cpio -- 500m 2. Linux9i_Disk2.cpio--- 600m 3.Linux9i_Disk3.cpio---- 250m I used cpio -idmv Linux9i_Disk1.cpio command to unpack the files. But Its taking more time to unpack the files.What could be the... (2 Replies)
Discussion started by: William1482
2 Replies

3. Shell Programming and Scripting

Unpack (extract) EAR / JAR files

i have about 30 .EAR files, every ear file have 1 .JAR file. so i need to extract .EAR files then extract .JAR files, and one important thing is that every archive must bee extracted to separate folder. i try with gzip, but when i extract 30 ear files i cant make separate folders.... (1 Reply)
Discussion started by: waso
1 Replies

4. Shell Programming and Scripting

Turning CSV files into individual Variables

I want to be able to convert the following data from a CSV into individual variables from the columns 2 4 and 8 I can use awk to grab the columns using var1=`cat text.csv | awk "," '{print $2}'` but how do I create separate variables for each line. 595358 ,ECON1010 ,THU ,08:00 - 10:00 ,11 Mar... (6 Replies)
Discussion started by: domsmith
6 Replies

5. Shell Programming and Scripting

Apply 'awk' to all files in a directory or individual files from a command line

Hi All, I am using the awk command to replace ',' by '\t' (tabs) in a csv file. I would like to apply this to all .csv files in a directory and create .txt files with the tabs. How would I do this in a script? I have the following script called "csvtabs": awk 'BEGIN { FS... (4 Replies)
Discussion started by: ScKaSx
4 Replies

6. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

7. Solaris

Auditing Individual Files

I have some Solaris 9 systems and I'm interested in using the "fm" audit class to track changes to sensitive files but it's too verbose for it to be auditing to that level for EVERY file, so I was wondering if there were a way of restricting the audit of those events to particular files. I... (0 Replies)
Discussion started by: thmnetwork
0 Replies

8. Shell Programming and Scripting

Grep multiple terms and output to individual files

Hi all, I'll like to search a list of tems in a huge file and then output each of the terms to individual files. I know I can use grep -f list main.file to search them but how can I split the output into individual files? Thank you. (6 Replies)
Discussion started by: ivpz
6 Replies

9. Programming

Python Reading Individual files and Regex through them

As a newbie to Python, I am trying to write a script in which is will add all the log files (*.log) from within a directory to a list, open the files and search for an ip using a regex and single it out (appending the ip's to the list). So far, I have: import re, os def list_files() content = ... (4 Replies)
Discussion started by: metallica1973
4 Replies

10. Shell Programming and Scripting

Unable to unpack files with bunzip2 using while loop

Hi, I have a problem with unzipping some file.xml.bz2 files to file.xml using while loop. all other processing on files is successfull except bunzip2. here is my piece of code while read i do bunzip2 $i done<file.lst; output : No such file or directory.le... (14 Replies)
Discussion started by: maroom
14 Replies
Test::Harness(3pm)					User Contributed Perl Documentation					Test::Harness(3pm)

NAME
Test::Harness - Run Perl standard test scripts with statistics VERSION
Version 3.25 SYNOPSIS
use Test::Harness; runtests(@test_files); DESCRIPTION
Although, for historical reasons, the Test::Harness distribution takes its name from this module it now exists only to provide TAP::Harness with an interface that is somewhat backwards compatible with Test::Harness 2.xx. If you're writing new code consider using TAP::Harness directly instead. Emulation is provided for "runtests" and "execute_tests" but the pluggable 'Straps' interface that previous versions of Test::Harness supported is not reproduced here. Straps is now available as a stand alone module: Test::Harness::Straps. See TAP::Parser, TAP::Harness for the main documentation for this distribution. FUNCTIONS
The following functions are available. runtests( @test_files ) This runs all the given @test_files and divines whether they passed or failed based on their output to STDOUT (details above). It prints out each individual test which failed along with a summary report and a how long it all took. It returns true if everything was ok. Otherwise it will "die()" with one of the messages in the DIAGNOSTICS section. execute_tests( tests => @test_files, out => *FH ) Runs all the given @test_files (just like "runtests()") but doesn't generate the final report. During testing, progress information will be written to the currently selected output filehandle (usually "STDOUT"), or to the filehandle given by the "out" parameter. The out is optional. Returns a list of two values, $total and $failed, describing the results. $total is a hash ref summary of all the tests run. Its keys and values are this: bonus Number of individual todo tests unexpectedly passed max Number of individual tests ran ok Number of individual tests passed sub_skipped Number of individual tests skipped todo Number of individual todo tests files Number of test files ran good Number of test files passed bad Number of test files failed tests Number of test files originally given skipped Number of test files skipped If "$total->{bad} == 0" and "$total->{max} > 0", you've got a successful test. $failed is a hash ref of all the test scripts that failed. Each key is the name of a test script, each value is another hash representing how that script failed. Its keys are these: name Name of the test which failed estat Script's exit value wstat Script's wait status max Number of individual tests failed Number which failed canon List of tests which failed (as string). $failed should be empty if everything passed. EXPORT
&runtests is exported by "Test::Harness" by default. &execute_tests, $verbose, $switches and $debug are exported upon request. ENVIRONMENT VARIABLES THAT TAP
::HARNESS::COMPATIBLE SETS "Test::Harness" sets these before executing the individual tests. "HARNESS_ACTIVE" This is set to a true value. It allows the tests to determine if they are being executed through the harness or by any other means. "HARNESS_VERSION" This is the version of "Test::Harness". ENVIRONMENT VARIABLES THAT AFFECT TEST
::HARNESS "HARNESS_TIMER" Setting this to true will make the harness display the number of milliseconds each test took. You can also use prove's "--timer" switch. "HARNESS_VERBOSE" If true, "Test::Harness" will output the verbose results of running its tests. Setting $Test::Harness::verbose will override this, or you can use the "-v" switch in the prove utility. "HARNESS_OPTIONS" Provide additional options to the harness. Currently supported options are: "j<n>" Run <n> (default 9) parallel jobs. "c" Try to color output. See "new" in TAP::Formatter::Base. "a<file.tgz>" Will use TAP::Harness::Archive as the harness class, and save the TAP to "file.tgz" "fPackage-With-Dashes" Set the formatter_class of the harness being run. Since the "HARNESS_OPTIONS" is separated by ":", we use "-" instead. Multiple options may be separated by colons: HARNESS_OPTIONS=j9:c make test "HARNESS_SUBCLASS" Specifies a TAP::Harness subclass to be used in place of TAP::Harness. Taint Mode Normally when a Perl program is run in taint mode the contents of the "PERL5LIB" environment variable do not appear in @INC. Because "PERL5LIB" is often used during testing to add build directories to @INC "Test::Harness" passes the names of any directories found in "PERL5LIB" as -I switches. The net effect of this is that "PERL5LIB" is honoured even in taint mode. SEE ALSO
TAP::Harness BUGS
Please report any bugs or feature requests to "bug-test-harness at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Harness <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Harness>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. AUTHORS
Andy Armstrong "<andy@hexten.net>" Test::Harness 2.64 (maintained by Andy Lester and on which this module is based) has this attribution: Either Tim Bunce or Andreas Koenig, we don't know. What we know for sure is, that it was inspired by Larry Wall's F<TEST> script that came with perl distributions for ages. Numerous anonymous contributors exist. Andreas Koenig held the torch for many years, and then Michael G Schwern. LICENCE AND COPYRIGHT
Copyright (c) 2007-2011, Andy Armstrong "<andy@hexten.net>". All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. perl v5.14.2 2012-06-08 Test::Harness(3pm)
All times are GMT -4. The time now is 03:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy