遠端執行ssh - Linux

By Kama
at 2010-10-29T13:50
at 2010-10-29T13:50
Table of Contents
我想直接由ssh取回遠端電腦上的一些當天剛產生當天的資料
ssh hardcover@remote_site ~/mytool -r '$(ls -l | tail -n1 | cut -c50-)' \
> my_data.txt
如果在 互動模式下就沒有沒問題,但在shell script下就會出錯。
出錯的是 '$(ls -l ......)' 這行。這行的目的是取得最新檔案的檔名。
thanks
--
ssh hardcover@remote_site ~/mytool -r '$(ls -l | tail -n1 | cut -c50-)' \
> my_data.txt
如果在 互動模式下就沒有沒問題,但在shell script下就會出錯。
出錯的是 '$(ls -l ......)' 這行。這行的目的是取得最新檔案的檔名。
thanks
--
Tags:
Linux
All Comments

By Emily
at 2010-11-01T02:20
at 2010-11-01T02:20
Related Posts
關於linux磁碟加密技術

By Elizabeth
at 2010-10-29T12:04
at 2010-10-29T12:04
console 會透視桌面

By Quanna
at 2010-10-29T10:01
at 2010-10-29T10:01
如何同時使用兩台Linux的X11程式

By Una
at 2010-10-29T09:21
at 2010-10-29T09:21
安裝ies4linux出現問題

By Candice
at 2010-10-29T02:20
at 2010-10-29T02:20
CP指令(NFS下)的效能問題

By Mia
at 2010-10-29T00:57
at 2010-10-29T00:57