disedorgue's locale may have added a trailing "e" to --to-commande .
Your locale may not support that. We have some linux boxes that are set to Spanish.
On those boxes, I mess up the spelling of some options/filenames for commands all the time, because I type without thinking.
zip files unfortunately don't stream well. They've got a table of contents and do lots of seeking around. You might have funzip, which can extract the first file from a zip via pipe, but only the first file.
$ tar xf arch.tar --to-command="perl ./unziplist.pl"
fich1.txt
fich2.txt
fich3.txt
fich4.txt
Perl script code:
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Uncompress::Unzip qw(unzip $UnzipError) ;
my $status=1;
my $z = new IO::Uncompress::Unzip "-"
or die "IO::Uncompress::Unzip failed: $UnzipError\n";
$status = $z->nextStream() while $status;
my @hdrs = $z->getHeaderInfo();
for (@hdrs) { print $$_{"Name"}."\n"; }
EDIT: perl script more short:
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Uncompress::Unzip qw($UnzipError) ;
my $z = new IO::Uncompress::Unzip "-"
or die "IO::Uncompress::Unzip failed: $UnzipError\n";
do { print $z->getHeaderInfo()->{"Name"}."\n" } while $z->nextStream();
The answer to your question, unfortunately, is no. It is not possible to know the content of the zip files without untarring them first. Regardless of other suggestions.
The tar -tvf will present to you a list of the content in the tar, but that's a list only, not the actual zip file and unzip -l does need to have the zip file to tell you what its content is. Therefore, the only way is to untar (extract the tar) first. And then let unzip -l read the content of it and report to you.
I' m remember that jar command manage also zip archive and can to work with stream:
$ tar xf arch.tar --to-command="jar tv"
283 Sat Jun 17 01:54:41 CEST 2017 fich1.txt
204 Sat Jun 17 01:54:54 CEST 2017 fich2.txt
487 Sat Jun 17 01:55:34 CEST 2017 fich3.txt
974 Sat Jun 17 01:56:01 CEST 2017 fich4.txt