Re: [問題] send command over ssh

看板Linux作者 (mathfeel)時間16年前 (2010/02/10 07:47), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《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
文章代碼(AID): #1BSVGOL2 (Linux)
文章代碼(AID): #1BSVGOL2 (Linux)