shell的問題 - Linux

By Doris
at 2009-09-05T01:00
at 2009-09-05T01:00
Table of Contents
今天遇到一個很奇怪的現象
有一個shell script file
如下
######## a.sh ############
xxx-yyy()
{
echo xxxyyy;
}
xxx-yyy
##########################
現在確定sh是link到bash
bash a.sh => OK
sh a.sh => a.sh: line 4: `xxx-yyy': not a valid identifier
現在不懂這問題是出在哪裡??
已經試過Ubuntu和Fedora的平台
--
有一個shell script file
如下
######## a.sh ############
xxx-yyy()
{
echo xxxyyy;
}
xxx-yyy
##########################
現在確定sh是link到bash
bash a.sh => OK
sh a.sh => a.sh: line 4: `xxx-yyy': not a valid identifier
現在不懂這問題是出在哪裡??
已經試過Ubuntu和Fedora的平台
--
Tags:
Linux
All Comments

By Kristin
at 2009-09-09T21:26
at 2009-09-09T21:26

By Bennie
at 2009-09-10T02:26
at 2009-09-10T02:26
Related Posts
以普通帳號執行root權限

By Aaliyah
at 2009-09-04T19:06
at 2009-09-04T19:06
Samba分享目錄無法進入

By Daniel
at 2009-09-03T16:10
at 2009-09-03T16:10
router開放20 21port卻無法連上FTP

By Jack
at 2009-09-03T15:43
at 2009-09-03T15:43
VMware 網路問題

By Eartha
at 2009-09-03T09:48
at 2009-09-03T09:48
修改server端的IP之後 使用rsync出現問題

By Vanessa
at 2009-09-02T17:44
at 2009-09-02T17:44