1
#!/bin/bash

awk 'NR!~/^(1|$q+2|$q+3)$/' deltay.txt > yota.txt

q is an integer obtain from a previous process in the script, and I need to erase lines one, the q+2 an q+3, but that command just erases lines 1... How to do it?
PS: I've tried with sed -e, but seems I don't own that command

0
1
awk -vq="$q" 'NR>1&&NR!=q+2&&NR!=q+3' deltay.txt > yota.txt

Not the answer you're looking for? Browse other questions tagged or ask your own question.