| 會員 ![]() | 請問關於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 他說找不到檔案 這該如何解決 |
| 回覆 |
| CM Board Moderator | 是 sh 說找不到檔案? 還是 lftp 說找不到檔案? 請先用 which 找出 lftp 的完整路徑, 然後在 test.sh 內加入 lftp 的完整路徑試試看....另外 myput.txt 也改用完整路徑, 不要只用 ./myput.txt |
| 回覆 |
| Kree ![]() | chmod +x test.sh ./test.sh |
| 回覆 |
| |
| XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。