ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Vladimir Karpinsky <vkarpinsky@mail.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] срочно нужна помощь bash, awk или perl
Date: Thu, 08 Dec 2011 16:18:04 +0400
Message-ID: <4EE0AAFC.8010303@mail.ru> (raw)
In-Reply-To: <50454.194.44.242.194.1323344289.metamail@webmail.meta.ua>

08.12.2011 15:38, Olexander Chernetskyy пишет:
> Уже на форуме задал этот же вопрос. Но, извините очень срочно нужно.
>
> Есть текстовый файл с уймой строк фиксированой длины.
> поля в строке разделены запятыми. Длина полей фиксирована.
> пример строки:
>
> 021211083610,            ,QWERTYUIASDF,ZXCVBNMDFGGG,000001d9,N,Y,1
>
> В поле #5 содержится 16-ричное значение.
> Нужно срочно перелопатить это файл и заменить 16-ричное значение на
> 10-тичное.
>

Лопатить, скорее всего, awk. А заменить: $((16#000001d9)), см. тред 
"Арифметика в bash" от 17.11 с.г. там мне это мудрые люди подсказали...

-- 
	С уважением,
		Владимир.


      parent reply	other threads:[~2011-12-08 12:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08 11:38 Olexander Chernetskyy
2011-12-08 12:01 ` Vladimir Didenko
2011-12-08 13:05   ` Olexander Chernetskyy
2011-12-08 13:08     ` Michael Shigorin
2011-12-08 13:16       ` Olexander Chernetskyy
2011-12-08 13:20     ` Vladimir Didenko
2011-12-08 13:34       ` Olexander Chernetskyy
2011-12-08 12:18 ` Vladimir Karpinsky [this message]

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=4EE0AAFC.8010303@mail.ru \
    --to=vkarpinsky@mail.ru \
    --cc=community@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 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