I am trying to edit compressed fastq.gz text files, by removing the first six characters of lines 2,6,10,14... I have two different ways of doing this right now, either usin
I wrote a script called zawk which can do this natively. It's similar to glenn jackman's answer to a duplicate of this question, but it handles awk
options and several different compression mechanisms and input methods while retaining FILENAME
and FNR
.
You'd use it like:
zawk 'awk logic goes here' log*.gz
This does not address sed's "in-place" flag (-i
).