05-19-2016
This looks like homework/classwork or interview Q
Thread closed
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
If any body knows how to read text file inside zip file,Plz help to complete my task.
Thanks lot. (4 Replies)
Discussion started by: ram2s2001
4 Replies
2. UNIX for Dummies Questions & Answers
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
Hi All,
I would like to extract specific file from a zip archive.
I have a zip archive "sample.zip".
sample.zip contains few text files and images... text1.txt, text2.txt, pic.jpg etc...
I need to read specific file "text2.txt" from "sample.zip" WITHOUT EXTRACTING the zip file.
... (4 Replies)
Discussion started by: sridharg
4 Replies
4. AIX
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
5. Shell Programming and Scripting
I have 2 zip files which have about 20 million records in each file. file 2 will have additional records than file 1. I want to compare the records in both the files and capture the new records from file 2 into another file file3. Please help me with a command/script which provides me the desired... (8 Replies)
Discussion started by: koneru
8 Replies
6. Shell Programming and Scripting
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
7. UNIX for Dummies Questions & Answers
Hi All,
could you please answer the below question.
1)How to read the data from zip file without unzip?
this is interview question
Regards
Priyanka (1 Reply)
Discussion started by: pspriyanka
1 Replies
8. UNIX for Beginners Questions & Answers
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
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
We have the data looks like below in a log file.
I want to generat files based on the string between two hash(#) symbol like below
Source:
#ext1#test1.tale2 drop
#ext1#test11.tale21 drop
#ext1#test123.tale21 drop
#ext2#test1.tale21 drop
#ext2#test12.tale21 drop
#ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
LEARN ABOUT SUSE
thread::semaphore
Thread::Semaphore(3pm) Perl Programmers Reference Guide Thread::Semaphore(3pm)
NAME
Thread::Semaphore - Thread-safe semaphores
VERSION
This document describes Thread::Semaphore version 2.09
SYNOPSIS
use Thread::Semaphore;
my $s = Thread::Semaphore->new();
$s->down(); # Also known as the semaphore P operation.
# The guarded section is here
$s->up(); # Also known as the semaphore V operation.
# The default semaphore value is 1
my $s = Thread::Semaphore-new($initial_value);
$s->down($down_value);
$s->up($up_value);
DESCRIPTION
Semaphores provide a mechanism to regulate access to resources. Unlike locks, semaphores aren't tied to particular scalars, and so may be
used to control access to anything you care to use them for.
Semaphores don't limit their values to zero and one, so they can be used to control access to some resource that there may be more than one
of (e.g., filehandles). Increment and decrement amounts aren't fixed at one either, so threads can reserve or return multiple resources at
once.
METHODS
->new()
->new(NUMBER)
"new" creates a new semaphore, and initializes its count to the specified number (which must be an integer). If no number is
specified, the semaphore's count defaults to 1.
->down()
->down(NUMBER)
The "down" method decreases the semaphore's count by the specified number (which must be an integer >= 1), or by one if no number
is specified.
If the semaphore's count would drop below zero, this method will block until such time as the semaphore's count is greater than or
equal to the amount you're "down"ing the semaphore's count by.
This is the semaphore "P operation" (the name derives from the Dutch word "pak", which means "capture" -- the semaphore operations
were named by the late Dijkstra, who was Dutch).
->up()
->up(NUMBER)
The "up" method increases the semaphore's count by the number specified (which must be an integer >= 1), or by one if no number is
specified.
This will unblock any thread that is blocked trying to "down" the semaphore if the "up" raises the semaphore's count above the
amount that the "down" is trying to decrement it by. For example, if three threads are blocked trying to "down" a semaphore by
one, and another thread "up"s the semaphore by two, then two of the blocked threads (which two is indeterminate) will become
unblocked.
This is the semaphore "V operation" (the name derives from the Dutch word "vrij", which means "release").
NOTES
Semaphores created by Thread::Semaphore can be used in both threaded and non-threaded applications. This allows you to write modules and
packages that potentially make use of semaphores, and that will function in either environment.
SEE ALSO
Thread::Semaphore Discussion Forum on CPAN: http://www.cpanforum.com/dist/Thread-Semaphore <http://www.cpanforum.com/dist/Thread-Semaphore>
Annotated POD for Thread::Semaphore: http://annocpan.org/~JDHEDDEN/Thread-Semaphore-2.09/lib/Thread/Semaphore.pm
<http://annocpan.org/~JDHEDDEN/Thread-Semaphore-2.09/lib/Thread/Semaphore.pm>
Source repository: http://code.google.com/p/thread-semaphore/ <http://code.google.com/p/thread-semaphore/>
threads, threads::shared
MAINTAINER
Jerry D. Hedden, <jdhedden AT cpan DOT org>
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.1 2010-04-26 Thread::Semaphore(3pm)