Closed. This question is off-topic。它当前不接受答案。
                            
                        
                    
                
                            
                                
                
                        
                            
                        
                    
                        
                            想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
                        
                        5年前关闭。
                                                                                            
                
        
问题:无法执行脚本

鉴于:
权限已更改为777

密码已用\ n插入

bash 4.3版本

脚本:

<shebang>
sudo -S < /home/x/Documents/somePassword
/opt/lamp/lamp start


输出:

usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: must be a root

最佳答案

你可能是说

sudo -S /opt/lamp/lamp start < /home/x/Documents/somePassword

关于linux - 无法执行sudo -S,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24992180/

10-10 14:03