ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [mdk-re] bash, read, странные вещи с последним аргументом
@ 2001-11-15 17:35 Michael Shigorin
  2001-11-16 11:50 ` [mdk-re] " Mikhail Zabaluev
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Shigorin @ 2001-11-15 17:35 UTC (permalink / raw)
  To: ALT Linux

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

	Здравствуйте. 
Имею: bash-2.04-ipl2mdk.
Делаю: чтение ряда значений из stdin и поэтапную их обработку.
Модель: 
echo -e 'a\tb\tc\td' | ( read a b c; echo $a-$b-$c )

При этом последний \t (нормально входящий в IFS) превращается в
пробел (проверено прогоном сквозь od -h) :((

В доке на bash (описание readline, 86% доки ;) говорят, что
"хвост" _вместе_ с разделителями должен был достаться последней
переменной (в примере -- c).

Потерял пару часов, пока вычислил... Пришлось в скрипте
поправить #!/bin/sh на #!/bin/zsh (который все сделал, как
положено).

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ http://visa.chem.univ.kiev.ua/~mike/

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-19 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-15 17:35 [mdk-re] bash, read, странные вещи с последним аргументом Michael Shigorin
2001-11-16 11:50 ` [mdk-re] " Mikhail Zabaluev
2001-11-19 14:12   ` Michael Shigorin
2001-11-19 15:04     ` Dmitry V. Levin

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