* [Comm] bash, date, mail
@ 2004-04-01 5:58 Eugene Prokopiev
2004-04-01 7:18 ` Artem K. Jouravsky
2004-04-01 7:21 ` Denis A. Yurashkou
0 siblings, 2 replies; 3+ messages in thread
From: Eugene Prokopiev @ 2004-04-01 5:58 UTC (permalink / raw)
To: Community
Здравствуйте!
Почему я не могу отправить письмо так:
$ export d=`date +'"date %x"'`
$ echo $d
"date 04/01/04"
$ echo hello | mail -s $d john
/bin/bash: -c: line 1: unexpected EOF while looking for matching `"'
/bin/bash: -c: line 2: syntax error: unexpected end of file
"04/01/04"": No match.
mail: (null): Bad address
но могу так:
$ echo hello | mail -s "date 04/01/04" john
?
--
С уважением, Прокопьев Евгений
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] bash, date, mail
2004-04-01 5:58 [Comm] bash, date, mail Eugene Prokopiev
@ 2004-04-01 7:18 ` Artem K. Jouravsky
2004-04-01 7:21 ` Denis A. Yurashkou
1 sibling, 0 replies; 3+ messages in thread
From: Artem K. Jouravsky @ 2004-04-01 7:18 UTC (permalink / raw)
To: Community
On Thu, Apr 01, 2004 at 09:58:03AM +0400, Eugene Prokopiev wrote:
> Здравствуйте!
>
> Почему я не могу отправить письмо так:
>
> $ export d=`date +'"date %x"'`
^ ^
это лишнее
> $ echo $d
> "date 04/01/04"
> $ echo hello | mail -s $d john
> /bin/bash: -c: line 1: unexpected EOF while looking for matching `"'
> /bin/bash: -c: line 2: syntax error: unexpected end of file
> "04/01/04"": No match.
> mail: (null): Bad address
>
> но могу так:
>
> $ echo hello | mail -s "date 04/01/04" john
--
С уважением,
Артём.
ЗАО "СЕМА.РУ"
************
Trying to establish voice contact ... please ____\b\b\b\byell into keyboard.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] bash, date, mail
2004-04-01 5:58 [Comm] bash, date, mail Eugene Prokopiev
2004-04-01 7:18 ` Artem K. Jouravsky
@ 2004-04-01 7:21 ` Denis A. Yurashkou
1 sibling, 0 replies; 3+ messages in thread
From: Denis A. Yurashkou @ 2004-04-01 7:21 UTC (permalink / raw)
To: community
'Eugene Prokopiev' wrote on 01.04.2004 9:58:
> Здравствуйте!
>
> Почему я не могу отправить письмо так:
>
> $ export d=`date +'"date %x"'`
> $ echo $d
> "date 04/01/04"
> $ echo hello | mail -s $d john
> /bin/bash: -c: line 1: unexpected EOF while looking for matching `"'
> /bin/bash: -c: line 2: syntax error: unexpected end of file
> "04/01/04"": No match.
> mail: (null): Bad address
>
> но могу так:
>
> $ echo hello | mail -s "date 04/01/04" john
>
> ?
Потому что кавычки-с...
Потому что shell воспринимает $d как тему и адрес через пробел.
$ echo hello | mail -s "$d" john
>
--
----------------
Best regards, Denis A. Yurashkou [DAY]
(dayfuaim@msx.ru)
Origin: Stop the World -- I Wanna Get Off!..
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-04-01 7:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-01 5:58 [Comm] bash, date, mail Eugene Prokopiev
2004-04-01 7:18 ` Artem K. Jouravsky
2004-04-01 7:21 ` Denis A. Yurashkou
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