Created
February 14, 2012 14:48
-
-
Save btedev/1827216 to your computer and use it in GitHub Desktop.
using sed on zipped files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Output lines 100 and 101 from a large gzipped file. | |
# '102q' causes sed to exit immediately upon line 102 which prevents | |
# zcat from continuing to cat the file after the lines we want. | |
zcat large_file.gz | sed -n '102q;100,101p' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment