ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexey Rusakov <ktirf@users.sf.net>
To: community@altlinux.ru
Subject: Re: [Comm] delimiter in awk
Date: Fri, 03 Dec 2004 20:03:35 +0300
Message-ID: <41B09C67.2050109@users.sf.net> (raw)
In-Reply-To: <41B09A56.4080708@iop.kiev.ua>

On 03.12.2004 19:54, Andrey Rybak wrote:

> Подскажите, как в awk задать табулятор разделителем полей.
> Обрабатываю текстовый файл. Создается он в сишной программе таким 
> образом: fprintf(uk,   "%f\t%f\t%f\n"  ,a,b,c), но в командной строке 
> табуляция имеет свое особое предназначение, как известно...

Вообще-то по умолчанию awk использует регулярное выражение "[[:blank:]]" 
для определения разделителей (AFAIK). Если вам нужны исключительно 
табуляторы, передайте в awk параметр -F'\t' либо в самом awk-скрипте 
пропишите
BEGIN { FS="\\t" }
По-моему, так.

-- 
  Alexey "Ktirf" Rusakov




  reply	other threads:[~2004-12-03 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-03 16:54 Andrey Rybak
2004-12-03 17:03 ` Alexey Rusakov [this message]
2004-12-03 17:03 ` Michael Isachenkov

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=41B09C67.2050109@users.sf.net \
    --to=ktirf@users.sf.net \
    --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