From: Sergey Kuznetsov <yozhik@atom.ru> To: community@altlinux.ru Subject: Re: [Comm] grep syntax question Date: Tue, 23 Mar 2004 21:29:59 +0300 Message-ID: <20040323212959.46f8cadd.yozhik@atom.ru> (raw) In-Reply-To: <4069564408.20040323132348@newlogic.com.ua> On Tue, 23 Mar 2004 13:23:48 +0200 tarasenko <tarasenko@newlogic.com.ua> wrote: > SK> Здравствуйте! > > SK> Для того, чтобы вывести на экран все закомментированные > SK> строчки какого-либо файла настройки достаточно сказать: > > SK> cat <some file> | grep ^# > > SK> А что надо сказать, чтобы увидеть НЕзакомментированные > SK> строчки? cat <some file> | grep !^# равоно как и cat <some > SK> file> | grep ^!# не прокатывает. > > Попробуй > > cat <file> | grep ^[^#] Такой вариант тоже работает (хотя вариант Дениса Филимонова [с ключом -v] изящнее)... > grep <file> '^[^#]' ^^^^^^^^^^^^^^^^^^^ ...а вот этот не пашет: [yozhik@localhost yozhik]$ grep /etc/X11/XF86Config-4 '^[^#]' grep: ^[^#]: No such file or directory С уважением, Сергей
next prev parent reply other threads:[~2004-03-23 18:29 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-03-20 15:35 Sergey Kuznetsov 2004-03-20 15:36 ` Denis S. Filimonov 2004-03-20 15:40 ` Sergey Kuznetsov 2004-03-23 11:23 ` tarasenko 2004-03-23 18:29 ` Sergey Kuznetsov [this message] 2004-03-23 11:26 ` tarasenko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040323212959.46f8cadd.yozhik@atom.ru \ --to=yozhik@atom.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git