Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ptar(1) [suse man page]

PTAR(1) 						 Perl Programmers Reference Guide						   PTAR(1)

NAME
ptar - a tar-like program written in perl DESCRIPTION
ptar is a small, tar look-alike program that uses the perl module Archive::Tar to extract, create and list tar archives. SYNOPSIS
ptar -c [-v] [-z] [-f ARCHIVE_FILE | -] FILE FILE ... ptar -x [-v] [-z] [-f ARCHIVE_FILE | -] ptar -t [-z] [-f ARCHIVE_FILE | -] ptar -h OPTIONS
c Create ARCHIVE_FILE or STDOUT (-) from FILE x Extract from ARCHIVE_FILE or STDIN (-) t List the contents of ARCHIVE_FILE or STDIN (-) f Name of the ARCHIVE_FILE to use. Default is './default.tar' z Read/Write zlib compressed ARCHIVE_FILE (not always available) v Print filenames as they are added or extraced from ARCHIVE_FILE h Prints this help message SEE ALSO
tar(1), L<Archive::Tar>. perl v5.12.1 2010-07-01 PTAR(1)

Check Out this Related Man Page

CPANPLUS::Internals::Extract(3pm)			 Perl Programmers Reference Guide			 CPANPLUS::Internals::Extract(3pm)

NAME
CPANPLUS::Internals::Extract - internals for archive extraction SYNOPSIS
### for source files ### $self->_gunzip( file => 'foo.gz', output => 'blah.txt' ); ### for modules/packages ### $dir = $self->_extract( module => $modobj, extractdir => '/some/where' ); DESCRIPTION
CPANPLUS::Internals::Extract extracts compressed files for CPANPLUS. It can do this by either a pure perl solution (preferred) with the use of "Archive::Tar" and "Compress::Zlib", or with binaries, like "gzip" and "tar". The flow looks like this: $cb->_extract Delegate to Archive::Extract METHODS
$dir = _extract( module => $modobj, [perl => '/path/to/perl', extractdir => '/path/to/extract/to', prefer_bin => BOOL, verbose => BOOL, force => BOOL] ) "_extract" will take a module object and extract it to "extractdir" if provided, or the default location which is obtained from your config. The file name is obtained by looking at "$modobj->status->fetch" and will be parsed to see if it's a tar or zip archive. If it's a zip archive, "__unzip" will be called, otherwise "__untar" will be called. In the unlikely event the file is of neither format, an error will be thrown. "_extract" takes the following options: module A "CPANPLUS::Module" object. This is required. extractdir The directory to extract the archive to. By default this looks something like: /CPANPLUS_BASE/PERL_VERSION/BUILD/MODULE_NAME prefer_bin A flag indicating whether you prefer a pure perl solution, ie "Archive::Tar" or "Archive::Zip" respectively, or a binary solution like "unzip" and "tar". perl The path to the perl executable to use for any perl calls. Also used to determine the build version directory for extraction. verbose Specifies whether to be verbose or not. Defaults to your corresponding config entry. force Specifies whether to force the extraction or not. Defaults to your corresponding config entry. All other options are passed on verbatim to "__unzip" or "__untar". Returns the directory the file was extracted to on success and false on failure. perl v5.16.2 2012-10-11 CPANPLUS::Internals::Extract(3pm)
Man Page

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Usage of optarg

Hello Friends, I need to pass arguments to a shell scripts. but for this i need to take the arguments only if they are supplied to the script as arguments. Like : Prompt > scriptname -d device_cd -s message so how do i capture these arguments ?> i think we have to use optarg.but i dont... (5 Replies)
Discussion started by: sveera
5 Replies

2. Shell Programming and Scripting

Optargs????

Hi I am sorry if my query is too simple ...... Can anybody explain the usage of optargs in shell script with options having arguments associated with them. Thanks in advance !!! (8 Replies)
Discussion started by: skyineyes
8 Replies

3. Programming

command line option: optarg

Hi I'm learning how to add in programm another option by command line. For example in the "my_prog" i want to add a " -k " option and then write a number. I mean: my_prog -k 50 and the i should use the number 50. I'm reading about getopt_long and optarg, and what i have done in the code... (0 Replies)
Discussion started by: Dedalus
0 Replies

4. Shell Programming and Scripting

OPTARG is not taking SPACE

Hi I have below code in one of my shell script: if ; then fail $USAGE; fi while getopts hz:r:t:dz: o do case "$o" in h) echo $USAGE ; exit 0;; r) export REQ_ID="$OPTARG";; t) TIMESPAN="$OPTARG";; d) detail="true";; ) ... (0 Replies)
Discussion started by: mohsin.quazi
0 Replies

5. Shell Programming and Scripting

optargs processing

Hello i'm writing some analyzing script and i'm giving to my program these parameters, for example: ./procinfo -r tmpfile sh -c "cat tmpfile" where -r is proccessed in getopts and it takes an argument by OPTARG.. The thing is I need to save this part to some variable: sh -c "cat tmpfile"... (4 Replies)
Discussion started by: midin
4 Replies

6. Shell Programming and Scripting

$OPTARG changes commandline input

Hi there, I hope, that I do not open an thread, that is already existing, but I didn't found something matching with my problem while searching for problems with "getopts" My problem ist, that I'm taking arguments from commandline into my script with getopts, I've an flag -s, after that there... (2 Replies)
Discussion started by: thommes_pommes
2 Replies

7. Shell Programming and Scripting

Pass date range into optarg

here is the code echo begin while getopts 1:2:3:4: mode do case $mode in 1)echo "You have chosen mode1" case $OPTARG in a) echo "User Specified Date Range" rangelist.sh ;; b) echo "user specified month and year";; ?) echo "Default, Current... (4 Replies)
Discussion started by: pravsripad
4 Replies

8. Shell Programming and Scripting

[BASH] getopts, OPTARG is passed but empty

EDIT: -- SOLVED -- Heyas, Getting used to optargs, but by far not understanding it. So i have that script that shall be 'changeable', trying to use the passed arguments to modify the script visuals. Passing: browser -t test -d sect $HOME Where -t should change the title, and -d... (0 Replies)
Discussion started by: sea
0 Replies

9. Shell Programming and Scripting

Getopts - space in argument (OPTARG)

Hi, I want to capture space as well from the argument eg: script.ksh -m "Message from xyz" -e "email@xyz.com" script.ksh -m 'Message from xyz' -e 'email@xyz.com' I am parsing using getopts, but for option "m" OPTARG is returning only "Message". Please use code tags next time for... (9 Replies)
Discussion started by: tostay2003
9 Replies