shell script中指令執行的問題 - Linux

By Olive
at 2008-07-24T12:01
at 2008-07-24T12:01
Table of Contents
最近裝了一台centos 5.2來測試
對於sh檔的用法還在摸索
但是遇到這樣的問題
sh檔內容
#! /bin/sh
echo "hello world"
echo Working directory is `pwd`
cd /home/test/new
echo `pwd`
但是顯示
Working directory is /home/test
: 沒有此一檔案或目錄 /home/test/new
/home/test
請問為什麼看不到此目錄呢
ls -al結果如下
drwxr-xr-x 2 test test 4096 7月 22 11:20 new
--
對於sh檔的用法還在摸索
但是遇到這樣的問題
sh檔內容
#! /bin/sh
echo "hello world"
echo Working directory is `pwd`
cd /home/test/new
echo `pwd`
但是顯示
Working directory is /home/test
: 沒有此一檔案或目錄 /home/test/new
/home/test
請問為什麼看不到此目錄呢
ls -al結果如下
drwxr-xr-x 2 test test 4096 7月 22 11:20 new
--
Tags:
Linux
All Comments

By Catherine
at 2008-07-26T23:37
at 2008-07-26T23:37

By Frederic
at 2008-07-28T12:07
at 2008-07-28T12:07

By Franklin
at 2008-08-02T01:52
at 2008-08-02T01:52

By Jacky
at 2008-08-04T20:12
at 2008-08-04T20:12
Related Posts
網站上的flash影片聽不到聲音?

By Rebecca
at 2008-07-24T11:10
at 2008-07-24T11:10
recompile the kernel之後滑鼠不能動

By Dora
at 2008-07-24T01:47
at 2008-07-24T01:47
關於DNS架設問題

By Margaret
at 2008-07-24T00:38
at 2008-07-24T00:38
安裝winxp via pxe

By Yedda
at 2008-07-24T00:14
at 2008-07-24T00:14
DNS named server Port

By Candice
at 2008-07-24T00:12
at 2008-07-24T00:12