I have a zipped text file a.zip I want to read the first 10 lines of it. Is it possible to do that without unzipping the whole file?
Asked
Active
Viewed 9,643 times
7
yukashima huksay
- 1,047
1 Answers
11
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|pipeszcatoutput toheadinputhead -n 10- shows first 10 lines from its standard input
N0rbert
- 103,263