D
D
DVoropaev2017-08-22 12:31:09
linux
DVoropaev, 2017-08-22 12:31:09

How to use grep to print all non-blank lines from a file. that don't start with a hash?

How to use grep to print all non-blank lines from a file. that don't start with '#'?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2017-08-22
@DVoropaev

grep -Pv "^(#|$)" <имя_файла>

M
moropsk, 2017-08-23
@moropsk

grep ^ /etc/zabbix/zabbix_agentd.conf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question