How to unzip only the first few lines of a zip archive?
This simple pipe-script works for me:
zcat a.zip | head -n 10
Here:
-
zcat a.zip
- unpacks zip-archive and sends its contents to standard output -
|
pipeszcat
output tohead
input -
head -n 10
- shows first 10 lines from its standard input