From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Alexandr R Ogurtzoff To: ALT Linux Community Subject: Re: [Comm] tty number in script... Date: Wed, 14 Jul 2004 10:03:35 +0300 User-Agent: KMail/1.6.2 References: <200407131747.34670.iscander@mercuri.mk.ua> <200407140909.35031.iscander@mercuri.mk.ua> <20040714062450.GB3155@immo.ru> In-Reply-To: <20040714062450.GB3155@immo.ru> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Message-Id: <200407141003.35673.iscander@mercuri.mk.ua> X-Virus-Scanned: by amavisd-new at localhost X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2004 07:08:28 -0000 Archived-At: List-Archive: List-Post: > А 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