ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexandr Leutin <leutin-lists@rambler.ru>
To: community@altlinux.ru
Subject: Re: [Comm] echo "две переменные"
Date: Wed, 15 Sep 2004 23:14:11 +0600
Message-ID: <20040915171411.GA2862@elektronik.olimp.chelseti.ru> (raw)
In-Reply-To: <20040915152327.GA29793@maximbo.istranet.ru>

On Wed, Sep 15, 2004 at 07:23:27PM +0400, Maxim Bodynasky wrote:
> Как-то это было написано Dolgov OV:
> > On Wed, 15 Sep 2004 18:53:15 +0400
> > Maxim Bodynasky <maximbo@rambler.ru> wrote:
> > > теперь мозги вывернул и я :-(
> > > ну не хочет у меня подобная ситуация воспроизводится, никак.
> > > Пишу в каталоге с кучей однотипных html:
> > > 
> > > $ for i in *.html; do n=`grep ^"<TITLE>" $i | sed s/"<TITLE>"// - |
> > > sed s/"<\/TITLE>"// -`; echo "$i - $n"; done
> > > 
> > > и всё прекрасно работает!
> > 
> > echo $n - $i
> > Именно в таком порядке, сначала текстовая переменная (во загнул), а
> > потом значение порядкового номера $i
> 
> а какая разница?

$i здесь принимает значение "file1.html\n", т.е. с переводом
строки. Ваше echo выдает аргументы в одну строку, т.е. сначала
печатает file1.html\n, возвращается на предыдущую строку и
печатает $n (с начала строки).

-- 
Леутин Александр
Жизнь -- смертельно интересная штука!


  reply	other threads:[~2004-09-15 17:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-15 12:53 Dolgov OV
2004-09-15 13:02 ` Dolgov OV
2004-09-15 14:53 ` Maxim Bodynasky
2004-09-15 15:04   ` Dolgov OV
2004-09-15 15:23     ` Maxim Bodynasky
2004-09-15 17:14       ` Alexandr Leutin [this message]
2004-09-16  6:56         ` Dolgov OV
2004-09-16  7:39           ` Alexandr Leutin
2004-09-16  8:11             ` Dolgov OV
2004-09-16 11:46               ` Alexandr Leutin
2004-09-16 12:14                 ` Dolgov OV
2004-09-16 11:47               ` Alexandr Leutin
2004-09-16 12:04               ` Dolgov OV

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=20040915171411.GA2862@elektronik.olimp.chelseti.ru \
    --to=leutin-lists@rambler.ru \
    --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