ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Alexey Borisenkov <grizlik78@gmail.com>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] awk
Date: Wed, 30 Jul 2008 22:17:33 +0500
Message-ID: <4890A22D.5010201@gmail.com> (raw)
In-Reply-To: <48909D9D.9050304@vladinfo.ru>



Aleksey E. Birukov пишет:
> Шилов Сергей пишет:
>> echo "aaa_bbb_ccc_bad" | gawk -v N=2 -- '{ i = 0 ; S = $0 ; while ( 
>> match(S, /_[bc]/) != 0 ) { i++ ; M = substr(S, RSTART, RLENGTH) ;  S = 
>> substr(S, RSTART+RLENGTH ) ; { if ( i == N ) { printf "%s\n", M ; 
>> break } } }'   
> Результат выполнения команды:
> gawk: cmd. 
> line:1:                                                                                                                                                                                
> ^ unexpected newline or end of string
> 
> С ходу не "просёк" что к чему...
Я в awk ничего не понимаю, но открыто 4 фигурных скобки, а закрыто только 3.


  reply	other threads:[~2008-07-30 17:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29 11:25 Aleksey E. Birukov
2008-07-29 20:11 ` Sergey Shilov
2008-07-29 20:57   ` Led
2008-07-30  7:16     ` Aleksey E. Birukov
2008-07-30  9:41       ` Sergey Shilov
2008-07-30 10:27         ` Led
2008-07-30 15:03           ` Шилов Сергей
2008-07-30 16:58             ` Aleksey E. Birukov
2008-07-30 17:17               ` Alexey Borisenkov [this message]
2008-07-30 20:10                 ` Sergey Shilov
2008-07-30 18:12               ` Led
2008-07-30 20:51                 ` Sergey Shilov

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=4890A22D.5010201@gmail.com \
    --to=grizlik78@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