[問題] shell script中指令執行的問題
最近裝了一台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
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.182.160
推
07/24 12:50, , 1F
07/24 12:50, 1F
→
07/24 12:52, , 2F
07/24 12:52, 2F
→
07/24 17:41, , 3F
07/24 17:41, 3F
→
07/24 17:42, , 4F
07/24 17:42, 4F