我有一個SCP腳本,看起來像這樣:bash和nohup的捕獲
#!/bin/bash
scp -r /usr/local/htdocs/$1 [email protected]$2:/local/htdocs
我想從命令行調用它,並通過目錄和目標服務器,與此類似:
move_site.sh website servername
但是,我想捕獲包含2個參數的文件中的輸出。
所以我想這一點,但使用的nohup
#!/bin/bash
scp -r /usr/local/htdocs/$1 [email protected]$2:/local/htdocs > $1$1.out
我怎樣組織既腳本和調用命令,以便它在後臺運行時調用它並沒有顯示任何信息,並捕獲輸出基於目的地和網站?