* Re: [Comm] [Sysadmins] странности с grep @ 2009-07-25 7:18 ` Michael Shigorin 0 siblings, 0 replies; only message in thread From: Michael Shigorin @ 2009-07-25 7:18 UTC (permalink / raw) To: ALT Linux sysadmin discuss; +Cc: community On Sat, Jul 25, 2009 at 03:15:06AM +0300, Mykola S. Grechukh wrote: > >> > Например, для того, чтобы убрать строки с комментариями и > >> > пустые строки можно применить последовательно два grep: > >> > $ grep -v '^[[:space:]]#' | grep -v '^$' > grep '^[^#]' А что, изящно, спасибо. Хорошая иллюстрация смены подхода вместо долбления в лоб: пустая строка -- это не только ^$, а и _не_ любой символ. PS: даю кросспост в community@, надеюсь, там тоже оценят. Просьба отвечать в ту рассылку, где прочитали (if ever). -- ---- WBR, Michael Shigorin <mike@altlinux.ru> ------ Linux.Kiev http://www.linux.kiev.ua/ ^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-25 7:18 UTC | newest] Thread overview: (only message) (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-07-25 7:18 ` [Comm] [Sysadmins] странности с grep Michael Shigorin
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