ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Oleg <ulug1@mail.ru>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] присваивание команды переменной в bash
Date: Fri, 15 Apr 2011 20:35:11 +0400
Message-ID: <4DA873BF.900@mail.ru> (raw)
In-Reply-To: <201104151904.47258@ruslandh>

On 04/15/2011 07:04 PM, Хихин Руслан wrote:
> Так у вас и юудет исполняться
> у вас `, а надо '
В скрипте:
назначение переменной  в виде test=`ls -l` и  вызов ее  "$test"
назначение переменной  в виде test='ls -l' и  вызов ее  exec test
срабатывают замечательно
а когда подставляю вместо ls -l :
/usr/local/bin/sendEmail -f Rbackup@my.domain -t op@my.domain -u "R 
backup - ERROR" -o message-charset=UTF-8 -m "ERROR"
не работает ни в каком виде - ни с `, ни с ', ни с "
А в shell-e работает. И когда вынес эту строку в отдельный скрипт - 
errmail.sh, а в основном скрипте - exec /usr/local/bin/errmail.sh
все сработало.

--
С уважением,
Олег



  reply	other threads:[~2011-04-15 16:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 13:23 ` Anton Gorlov
2011-04-14 13:32   ` Oleg
2011-04-14 13:39     ` Anton Gorlov
2011-04-15 13:39       ` Oleg
2011-04-15 13:59         ` Хихин Руслан
2011-04-15 14:31           ` Oleg
2011-04-15 15:04             ` Хихин Руслан
2011-04-15 16:35               ` Oleg [this message]
2011-04-15 17:31                 ` Хихин Руслан
2011-04-15 18:03                   ` Oleg
2011-04-15 19:02                     ` Хихин Руслан
2011-04-15 20:45                     ` Sergey Shilov
2011-04-14 13:40     ` Тимур Васюнин

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=4DA873BF.900@mail.ru \
    --to=ulug1@mail.ru \
    --cc=sysadmins@lists.altlinux.org \
    /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 sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/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 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git