shell ftp 之後再執行動作 - Linux

By Heather
at 2012-04-02T11:42
at 2012-04-02T11:42
Table of Contents
下面shell是連到ftp 之後要輸出時間至end.txt,但ftp close後就結束這個shell,
不會再執行下面輸出的動作,不知有沒有什麼指令可以再繼續動作
#! /bin/sh
......
......
startTime=`/bin/date +"%Y%m%d %H:%M:%S"`
echo $startTime >> /home/admin/start.txt
ftp -n "$host" <<EOC
user $id $pw
binary
cd $remodir
bye
endTime=`/bin/date +"%Y%m%d %H:%M:%S"`
echo $endTime > /home/admin/end.txt
--
不會再執行下面輸出的動作,不知有沒有什麼指令可以再繼續動作
#! /bin/sh
......
......
startTime=`/bin/date +"%Y%m%d %H:%M:%S"`
echo $startTime >> /home/admin/start.txt
ftp -n "$host" <<EOC
user $id $pw
binary
cd $remodir
bye
endTime=`/bin/date +"%Y%m%d %H:%M:%S"`
echo $endTime > /home/admin/end.txt
--
Tags:
Linux
All Comments

By Anthony
at 2012-04-02T18:13
at 2012-04-02T18:13
Related Posts
有關於空密碼的問題

By Daniel
at 2012-04-01T20:34
at 2012-04-01T20:34
有關虛擬console這個"名詞"的問題

By Quintina
at 2012-04-01T19:28
at 2012-04-01T19:28
買舊筆電想裝lubuntu

By Rosalind
at 2012-04-01T19:00
at 2012-04-01T19:00
Ubuntu的新產品

By Candice
at 2012-04-01T18:15
at 2012-04-01T18:15
Suse Enterprise 11 安裝Cacti缺少Sockets問題

By Noah
at 2012-04-01T15:54
at 2012-04-01T15:54