Re: [問題] send command over ssh
※ 引述《virtuemood (小毛)》之銘言:
: 就是會有用到 bash script 送指令到遠端的需求
: 可是似乎不是很方便
: 我現在是用 expact 來寫
: 但是和 bash script 寫在一起的時後很麻煩
: 要除錯也不方便
: 有沒有一種指令可以這樣玩的
: 如:
: send "command" user@host
: 然後等遠端跑玩這行指令後再執行下一行
ssh username@host "command"
我常用這個來比較手上和遠程的檔案:
diff Makefile <(ssh username@host "cat ${PWD}/Makefile")
省下先用scp把遠方檔案拉過來。
--
In heaven, all the interesting people are missing.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 128.54.37.146
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):