ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Ivan Zakharyaschev <imz@linux.ru.net>
To: <mandrake-russian@linuxteam.iplabs.ru>
Subject: Re: Re[2]: [mdk-re] Beta bugreport 3
Date: Wed Feb 28 19:58:12 2001
Message-ID: <Pine.LNX.4.33L.0102281949580.2049-100000@zephyrous.ru> (raw)
In-Reply-To: <20010228112505.723c357e.vyt_o@mail.ru>

	Hello, Vyt!

On Wed, 28 Feb 2001, Vyt wrote:

> У меня подруга учится (курсы в Питере, в Политехе, на 2-е высшее, по
> собственному рвению, на свои кровные), сдается на инженера CISCO (не
> помню
> точное название), но этим теперь мало кого удивишь ;) Так им кроме
> мд2000
> еще и Linux преподают! И в субботу экзамен по bash :) И она
> периодически
> задает вопросы, на которые приходится смущенно хмыкать. Так вот,
> научите
> меня научить ее ;) стандартными (?! такое задание) средствами bash
> выводить число в заданной системе счисления (2, 8, 16), пожалуйста! К 8
> марта ;)

Да вот, пожалуйста, например:

$ echo $(( 17#G )); echo $(( $((16#F))#10 )); echo $(( 50#hello ))
16
15
108053574


Описано в man bash, раздел ARITHMETIC EVALUATION.

> PS printf'ом получилось вывести только в 8-й и 16-й системах. Самой
> прогу
> писать, видимо, нельзя, должен быть простой способ

-- 
С наилучшими пожеланиями,
	Ivan Z.




  reply	other threads:[~2001-02-28 19:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-23 11:50 Roman Mediakov
2001-02-23 12:44 ` Aleksey Novodvorsky
2001-02-23 13:18   ` Aleksandr Blohin
2001-02-23 13:45     ` cornet
2001-02-27 16:24 ` Alex
2001-02-27 16:35   ` rider
2001-02-27 17:11     ` Dmitry S Kiselev
2001-02-27 17:15       ` rider
2001-02-27 17:54         ` cornet
2001-02-27 23:18       ` Re[2]: " suralis
2001-02-28  5:19         ` Dmitry Samoyloff
2001-02-28 11:12           ` Re[4]: " suralis
2001-02-28  6:51         ` Re[3]: " Roman Mediakov
2001-02-28  9:17         ` Re[2]: " Dmitry Dmitriev
2001-02-27 17:17     ` Roman Mediakov
2001-02-27 17:33       ` Viacheslav Kaloshin
2001-02-27 18:04         ` cornet
2001-02-28 11:25       ` Re[2]: " Vyt
2001-02-28 19:58         ` Ivan Zakharyaschev [this message]
2001-03-01 13:02           ` Vyt
2001-02-27 23:49     ` Practical gender research (Was: Re[2]: [mdk-re] Beta bugreport 3) Maksim Otstavnov
2001-02-27 23:54       ` Alexander Bokovoy
2001-02-27 17:24   ` [mdk-re] Beta bugreport 3 Aleksey Novodvorsky

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=Pine.LNX.4.33L.0102281949580.2049-100000@zephyrous.ru \
    --to=imz@linux.ru.net \
    --cc=mandrake-russian@linuxteam.iplabs.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