PCZONE 討論區

PCZONE 討論區 (https://www.pczone.com.tw/vbb3/)
-   -- FreeBSD & Linux 討 論 版 (https://www.pczone.com.tw/vbb3/forum/41/)
-   -   請問關於linux下的腳本問題 (https://www.pczone.com.tw/vbb3/thread/41/111306/)

chrisdar 2005-05-20 09:31 AM

請問關於linux下的腳本問題
 
使用者目錄式 /home/test
目前在 ~/mytest 下有兩個檔案
第一個是 myput.txt 內容是
open -u anonymous,anonymous -p 21 127.0.0.1
lcd /home/test/tmp
mput -c *.*
第二個是 test.sh 內容是
#!/bin/bash
lftp -f ./myput.txt

然後在指令模式 的 ~/mytest 目錄下
下達 lftp -f myput.txt 正常
下達 sh test.sh 他說找不到檔案

這該如何解決

raytracy 2005-05-20 11:23 AM

是 sh 說找不到檔案? 還是 lftp 說找不到檔案? 請先用 which 找出 lftp 的完整路徑, 然後在 test.sh 內加入 lftp 的完整路徑試試看....另外 myput.txt 也改用完整路徑, 不要只用 ./myput.txt

linux_xp 2005-05-20 04:16 PM

chmod +x test.sh
./test.sh


所有時間均為 +8。現在的時間是 02:17 AM。



 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。