ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Rinat Bikov <bikoz.r@gmail.com>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] странности с grep
Date: Fri, 17 Jul 2009 16:20:36 +0500
Message-ID: <f725ea640907170420p3197d99awb548bb90d5b67fa1@mail.gmail.com> (raw)
In-Reply-To: <200907171455.54211.victor@cas.ru>

17 июля 2009 г. 15:55 пользователь Victor Sinyawsky написал:
> On Friday 17 July 2009 14:09:02 Kharitonov A. Dmitry wrote:
>> Dmitry V. Levin wrote:
>> > On Fri, Jul 17, 2009 at 01:48:20PM +0400, Victor Sinyawsky wrote:
>> >>    Пытаюсь просмотреть файл без отображения комментов.
>> > $ grep '^[[:space:]]*[^[:space:]#]'
>> egrep -v '^[[:space:]]*#'
> Да, действительно, так работает!
> Спасибо.
Интересно, а можно ли в grep/egrep использовать альтернативу?
Например, для того, чтобы убрать строки с комментариями и пустые строки
можно применить последовательно два grep:
$ grep -v '^[[:space:]]#' | grep -v '^$'
Но в одной команде:
$ grep -v '^[[:space:]][#$]'
Не работает...

-- 
С уважением, Ринат Биков.

  reply	other threads:[~2009-07-17 11:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17  9:48 Victor Sinyawsky
2009-07-17  9:55 ` Max Ivanov
2009-07-17 10:38   ` Victor Sinyawsky
2009-07-17 11:43     ` Kharitonov A. Dmitry
2009-07-17 11:55       ` Victor Sinyawsky
2009-07-17 12:02         ` Kharitonov A. Dmitry
2009-07-17  9:56 ` Dmitry V. Levin
2009-07-17 10:09   ` Kharitonov A. Dmitry
2009-07-17 10:55     ` Victor Sinyawsky
2009-07-17 11:20       ` Rinat Bikov [this message]
2009-07-17 11:25         ` Led
2009-07-24 20:02           ` [Sysadmins] [JT] " Michael Shigorin
2009-07-25  0:15             ` [Sysadmins] " Mykola S. Grechukh
2009-07-25  7:18               ` Michael Shigorin
2009-07-28 20:13             ` [Sysadmins] [JT] " Kharitonov A. Dmitry
2009-07-17 11:36         ` [Sysadmins] " Kharitonov A. Dmitry
2009-07-17 11:20 ` Led

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=f725ea640907170420p3197d99awb548bb90d5b67fa1@mail.gmail.com \
    --to=bikoz.r@gmail.com \
    --cc=sysadmins@lists.altlinux.org \
    /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 sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/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 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git