ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] помогите скриптиком
@ 2003-06-02  8:18 ILYA Sibgatullin
  2003-06-02 17:08 ` [Comm] " Michael Shigorin
  0 siblings, 1 reply; 2+ messages in thread
From: ILYA Sibgatullin @ 2003-06-02  8:18 UTC (permalink / raw)
  To: community

Вообщем сабж. Желательно на баше. От него надо:
1) Выполнить команду.
2) Найти в выводе команды словa.
3) И в зависимости от того, есть словa или нет, выполнять разные 
команды.
А теперь поточнее. 
1) xmms-shell -e status
2) если есть playing и paused -- radio -qf $1
    только playing -- radio -qm
    ни playing, ни paused -- radio -qf $1
-- 
1. тестировать надо такие вещи;
2. предупреждать надо;
3. убери этот alias, ибо он не работает так, как было задумано.

	-- ldv in sisyphus@



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

* [Comm] Re: помогите скриптиком
  2003-06-02  8:18 [Comm] помогите скриптиком ILYA Sibgatullin
@ 2003-06-02 17:08 ` Michael Shigorin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Shigorin @ 2003-06-02 17:08 UTC (permalink / raw)
  To: community

On Mon, Jun 02, 2003 at 02:18:43PM +0600, ILYA Sibgatullin wrote:
> Вообщем сабж. Желательно на баше. От него надо:
> 1) Выполнить команду.
> 2) Найти в выводе команды словa.
> 3) И в зависимости от того, есть словa или нет, выполнять
> разные команды.
> А теперь поточнее. 
> 1) xmms-shell -e status
> 2) если есть playing и paused -- radio -qf $1
>     только playing -- radio -qm
>     ни playing, ни paused -- radio -qf $1

Почитайте man bash, bash conspect (google://), посмотрите
подручные скрипты -- все просто :) а нужен grep(1) и if или case.

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


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

end of thread, other threads:[~2003-06-02 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-02  8:18 [Comm] помогите скриптиком ILYA Sibgatullin
2003-06-02 17:08 ` [Comm] " Michael Shigorin

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