shell command 的問題 - Linux

By Ethan
at 2010-11-15T13:20
at 2010-11-15T13:20
Table of Contents
如果有一個command line
echo "Yes"|sh myCommand y
如果在shell script內可以用 read 去讀取前面的stdinput "Yes"
但是如果要讀取一些特殊自元的話 例如 echo "?"|sh myCommand y
或者 echo "Great!"|sh myCommand y
echo "?" 會出現的錯誤訊息是 test: unknown operator 5
echo "Great!" 則錯誤訊息會跑出我的script.. 例如
echo "Great"find ~/.xxx/"|myCommand y
>
然後就會出現問題
google 沒看到相關的問題 (或者我關鍵字下錯..)
不知道有沒有板友們知道這是什麼問題嗎
--
echo "Yes"|sh myCommand y
如果在shell script內可以用 read 去讀取前面的stdinput "Yes"
但是如果要讀取一些特殊自元的話 例如 echo "?"|sh myCommand y
或者 echo "Great!"|sh myCommand y
echo "?" 會出現的錯誤訊息是 test: unknown operator 5
echo "Great!" 則錯誤訊息會跑出我的script.. 例如
echo "Great"find ~/.xxx/"|myCommand y
>
然後就會出現問題
google 沒看到相關的問題 (或者我關鍵字下錯..)
不知道有沒有板友們知道這是什麼問題嗎
--
Tags:
Linux
All Comments

By Joseph
at 2010-11-16T15:30
at 2010-11-16T15:30

By Ula
at 2010-11-21T12:42
at 2010-11-21T12:42

By Steve
at 2010-11-22T01:02
at 2010-11-22T01:02

By Kelly
at 2010-11-23T01:46
at 2010-11-23T01:46
Related Posts
想砍init?

By Damian
at 2010-11-15T02:54
at 2010-11-15T02:54
想砍init?

By Rachel
at 2010-11-15T02:32
at 2010-11-15T02:32
顯卡用什麼驅動程式哪裡看?

By Zenobia
at 2010-11-15T02:14
at 2010-11-15T02:14
[情報] Ubuntu 10.10 Release Party @ Taipei

By Elizabeth
at 2010-11-14T20:55
at 2010-11-14T20:55
KDE4的問題

By Susan
at 2010-11-14T20:14
at 2010-11-14T20:14