Skip to content

Instantly share code, notes, and snippets.

@btedev
Created February 14, 2012 14:48
Show Gist options
  • Save btedev/1827216 to your computer and use it in GitHub Desktop.
Save btedev/1827216 to your computer and use it in GitHub Desktop.
using sed on zipped files
# 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