ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexandr R Ogurtzoff <iscander@mercuri.mk.ua>
To: ALT Linux Community <community@altlinux.ru>
Subject: Re: [Comm] tty number in script...
Date: Wed, 14 Jul 2004 10:03:35 +0300
Message-ID: <200407141003.35673.iscander@mercuri.mk.ua> (raw)
In-Reply-To: <20040714062450.GB3155@immo.ru>


> А man `basename $SHELL` читать не пробовали?
>
> bash:
>               \l     the basename of the shell's terminal device name
>
> zsh:
>        %l     The line (tty) the user is logged in on, without `/dev/'
> prefix. If the name starts with `/dev/tty', that prefix is stripped.
 Пробовал! получалось :-)

PS1="[\u@\h `tty` \w]\$ "
[iscander@iscander /dev/pts/2 ~]$ PS1="[\u@\h `fgconsole` \w]\$ "
[iscander@iscander 7 ~]$ PS1="[\u@\h \l \w]\$ "
[iscander@iscander 2 ~]$
с tty наиболее полный вывод получается,на мой взгляд более  "политкорректный"!
Всёж таки различает псевдотерминал и реальную консоль, но за ещё одно зёрнышко 
опыта спасибо.
--
С наилучшими пожеланиями
With best regards
Александр Огурцов
Alexandr Ogurtzoff


      reply	other threads:[~2004-07-14  7:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-13 14:47 Alexandr R Ogurtzoff
2004-07-13 15:52 ` Yuri N. Glibovetz
2004-07-13 16:06 ` Alex Yustasov
2004-07-14  6:09 ` Alexandr R Ogurtzoff
2004-07-14  6:24   ` Alexey I. Froloff
2004-07-14  7:03     ` Alexandr R Ogurtzoff [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=200407141003.35673.iscander@mercuri.mk.ua \
    --to=iscander@mercuri.mk.ua \
    --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