簡體   English   中英

當腳本中的用戶發生變化時,我的腳本文件停止執行我該怎么辦

[英]My script file stopped executing when there change in user in script what should i do

我的代碼文件如下所示

     Cd testR
     Mkdir bin
     chmod -R 755 bin
     Sudo su - inst1 
     cp inst1/installable/files/testR.p
     ...
     ...

所以在 sudo su 執行暫停后請讓我知道我該怎么做

如果您的命令以 root 身份執行沒有問題,您可以像這樣執行腳本:sudo./yourscript

因此,您不必在 shell 腳本中進行切換。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM