I have a file with one word/character for each line. Example:
a
abandonado
esta
estabelecimento
o
onibus
c
casa
police
I need remove lines with specific pattern (ex. pattern "esta"). I tried with awk
cat file | awk '!/^esta/'
but this solution remove the all lines with the pattern "esta"
and "estabelecimento"
too. I need only remove the line with the specific pattern "esta"
not line with "estabelecimento"
.
The same problem occurs with the lines with the patterns "o"
and "a"
. The command removes all lines with start with this pattern.