Hi Friends,
I am using a command that prints certain lines from a file.
For ex:
cat input
My command
Output being printed is
I want to pipe this output to sed or whatever to delete these lines. Maybe like this
My final required input file should be
I don't want to try it for myself because it is a huge 27GB input file. Any mistakes will cost me money and time to regenerate it.
I am using a command that prints certain lines from a file.
For ex:
cat input
Code:
abc chr1 456
def chr1 789
ghi chr1 999
jjj chr1 777
jhk chr7 914
Code:
awk '{if($2=="chr1" && $3>=456 && $3<=999) {print $0}}' OFS="\t" input
Code:
abc chr1 456
def chr1 789
ghi chr1 999
Code:
awk '{if($2=="chr1" && $3>=456 && $3<=999) {print $0}}' OFS="\t" input | sed '/d/'
Code:
jjj chr1 777
jhk chr7 914