我正在尝试使用bash脚本来自动化一些离线Ubuntu系统上的系统更新,使用APT-脱机工具。当运行(例如) apt-offline install bundle.zip时,它首先向用户提供一个选项菜单:
(Y) Yes. Proceed with Installation
(N) No, Abort.
(C) Display changelog
(?) Display this help message.
What would you like to do next: (y, N, ?)看一下离线手册页面,我没有看到一个"-y“选项或者类似于绕过这个菜单的东西。如果我只是在bash脚本中执行初始的apt-offline install bundle.zip命令,那么如何让脚本在菜单提示符下自动输入"y“并继续执行呢?
发布于 2022-08-02 17:54:38
不要紧。人才外流。答案很简单。
yes | apt-offline install bundle.zip
https://stackoverflow.com/questions/73200161
复制相似问题