我創建了一個shell腳本,我想在終端上使用Exec
功能。終端執行功能
例如:
function update() {
sudo apt update
}
function Exec() {
xfce4-terminal --maximize -x "$1"
}
但是,當我執行此:
Exec "update"
或Exec "$(update)"
我得到這個錯誤:Failed to execute child process "update" (No such file or directory)
什麼是錯誤信息? – AlG
這是錯誤消息: 未能執行子進程「更新」(沒有這樣的文件或目錄) –
您是否嘗試將更新函數傳遞給Exec函數並使其作爲$ 1參數運行? – AlG