bash help (ubuntu)Update Manager shows '2 updates have been selected' when there are no updatesSystem not checking for updates in Ubuntu 13.04Upgrade Problem with 12.04Why Does Software Updater Say No updates Available, but apt-get upgrade Shows updates available?One single command to update everything in Ubuntu?Disable automatic updates ubuntu 18.04
Do airplanes need brakes in the air?
Speaking German abroad and feeling condescended to
What would happen to the world if all lightning stopped?
Does a motor suffer damage when resistance to the intended motion is met?
Famous conjecture or unsolved problem that could be plausibly proven/solved by freshman mathematician?
Is it sportsmanlike to waste opponents' time by giving check at the end of the game?
Meaning of "Nur so anbei."
What on earth is this small wall-mounted computer?
Slimy whey in store-bought yoghurt
Why is it “Cat in the Hat”?
What deck size is ideal?
Physical interpretation of complex numbers
In a shuttle launch, what would have happened if all three SSMEs failed during flight?
How to draw the following image in TikZ?
Hands-on murderer
How to get out of the Ice Palace in Zelda A link to the Past?
"Cобака на сене" - is this expression still in use or is it dated?
Could the Ancient Egyptian hieroglyphs have been deciphered without the Rosetta Stone with modern tech?
Was the whistle-blower's (12 Aug 2019) complaint deemed credible?
Is it a good idea to contact a candidate?
Possible executive assistant job scam
Why does Smaug have 4 legs in the 1st movie but only 2 legs in the 2nd?
Why do airports in the UK have so few runways?
What is this sound, instrument? (Rheingold, Wagner)
bash help (ubuntu)
Update Manager shows '2 updates have been selected' when there are no updatesSystem not checking for updates in Ubuntu 13.04Upgrade Problem with 12.04Why Does Software Updater Say No updates Available, but apt-get upgrade Shows updates available?One single command to update everything in Ubuntu?Disable automatic updates ubuntu 18.04
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I made a script that has an update command running first
for example
sudo apt -y update
I need to make sure that if SYSTEM updates are available , the script will
ask me if i want to update
so
EXCEPTION
the script will check for system updates , if updates are available i will be
asked if i want to update ("Would you like to update? Y/N)
if Y is selected , the script will perform the following command
apt -y upgrade
I am aware that in production areas you do not perform update and upgrades on the fly , but this is only for my set up.
Is it possible to do so using the command - trap , or read command?
Edit from comment:
Okay so here is the script https://github.com/V4riableZ/Tools/tree/master/Bash In the line where i perform apt update , i want to know if updates are available and also , to be asked if i want to perform apt -y upgrade ("System updates are available , would you like to upgrade now? Y/N")
command-line upgrade updates
|
show 2 more comments
I made a script that has an update command running first
for example
sudo apt -y update
I need to make sure that if SYSTEM updates are available , the script will
ask me if i want to update
so
EXCEPTION
the script will check for system updates , if updates are available i will be
asked if i want to update ("Would you like to update? Y/N)
if Y is selected , the script will perform the following command
apt -y upgrade
I am aware that in production areas you do not perform update and upgrades on the fly , but this is only for my set up.
Is it possible to do so using the command - trap , or read command?
Edit from comment:
Okay so here is the script https://github.com/V4riableZ/Tools/tree/master/Bash In the line where i perform apt update , i want to know if updates are available and also , to be asked if i want to perform apt -y upgrade ("System updates are available , would you like to upgrade now? Y/N")
command-line upgrade updates
1
Why does notapt upgradesuffice? Also remember thataptis a front end for various other (apt-getandapt-cachecomes to mind) programs, and as such it's maybe better to wrap those directly?
– vidarlo
Jul 19 at 15:11
I did not understand your question
– V4riableZ
Jul 19 at 15:26
1
If you runapt upgradeit will ask before performing any changes. Why would this not suffice?
– vidarlo
Jul 19 at 15:42
1
@vidario is trying to say that if you run:sudo apt update && sudo apt upgrade, you will experience the behavior you have described. If you runsudo apt update && sudo apt upgrade -y, you will automatically install updates and it will not ask you for confirmation. It's unclear what you're asking to fix, or what your ultimate goal is.
– earthmeLon
Jul 19 at 16:06
1
Please provide us about your script to auto-update or auto-uprade of apt?
– abu-ahmed al-khatiri
Jul 19 at 16:32
|
show 2 more comments
I made a script that has an update command running first
for example
sudo apt -y update
I need to make sure that if SYSTEM updates are available , the script will
ask me if i want to update
so
EXCEPTION
the script will check for system updates , if updates are available i will be
asked if i want to update ("Would you like to update? Y/N)
if Y is selected , the script will perform the following command
apt -y upgrade
I am aware that in production areas you do not perform update and upgrades on the fly , but this is only for my set up.
Is it possible to do so using the command - trap , or read command?
Edit from comment:
Okay so here is the script https://github.com/V4riableZ/Tools/tree/master/Bash In the line where i perform apt update , i want to know if updates are available and also , to be asked if i want to perform apt -y upgrade ("System updates are available , would you like to upgrade now? Y/N")
command-line upgrade updates
I made a script that has an update command running first
for example
sudo apt -y update
I need to make sure that if SYSTEM updates are available , the script will
ask me if i want to update
so
EXCEPTION
the script will check for system updates , if updates are available i will be
asked if i want to update ("Would you like to update? Y/N)
if Y is selected , the script will perform the following command
apt -y upgrade
I am aware that in production areas you do not perform update and upgrades on the fly , but this is only for my set up.
Is it possible to do so using the command - trap , or read command?
Edit from comment:
Okay so here is the script https://github.com/V4riableZ/Tools/tree/master/Bash In the line where i perform apt update , i want to know if updates are available and also , to be asked if i want to perform apt -y upgrade ("System updates are available , would you like to upgrade now? Y/N")
command-line upgrade updates
command-line upgrade updates
edited Jul 22 at 13:32
Elder Geek
28.7k11 gold badges64 silver badges142 bronze badges
28.7k11 gold badges64 silver badges142 bronze badges
asked Jul 19 at 14:41
V4riableZV4riableZ
61 bronze badge
61 bronze badge
1
Why does notapt upgradesuffice? Also remember thataptis a front end for various other (apt-getandapt-cachecomes to mind) programs, and as such it's maybe better to wrap those directly?
– vidarlo
Jul 19 at 15:11
I did not understand your question
– V4riableZ
Jul 19 at 15:26
1
If you runapt upgradeit will ask before performing any changes. Why would this not suffice?
– vidarlo
Jul 19 at 15:42
1
@vidario is trying to say that if you run:sudo apt update && sudo apt upgrade, you will experience the behavior you have described. If you runsudo apt update && sudo apt upgrade -y, you will automatically install updates and it will not ask you for confirmation. It's unclear what you're asking to fix, or what your ultimate goal is.
– earthmeLon
Jul 19 at 16:06
1
Please provide us about your script to auto-update or auto-uprade of apt?
– abu-ahmed al-khatiri
Jul 19 at 16:32
|
show 2 more comments
1
Why does notapt upgradesuffice? Also remember thataptis a front end for various other (apt-getandapt-cachecomes to mind) programs, and as such it's maybe better to wrap those directly?
– vidarlo
Jul 19 at 15:11
I did not understand your question
– V4riableZ
Jul 19 at 15:26
1
If you runapt upgradeit will ask before performing any changes. Why would this not suffice?
– vidarlo
Jul 19 at 15:42
1
@vidario is trying to say that if you run:sudo apt update && sudo apt upgrade, you will experience the behavior you have described. If you runsudo apt update && sudo apt upgrade -y, you will automatically install updates and it will not ask you for confirmation. It's unclear what you're asking to fix, or what your ultimate goal is.
– earthmeLon
Jul 19 at 16:06
1
Please provide us about your script to auto-update or auto-uprade of apt?
– abu-ahmed al-khatiri
Jul 19 at 16:32
1
1
Why does not
apt upgrade suffice? Also remember that apt is a front end for various other (apt-get and apt-cache comes to mind) programs, and as such it's maybe better to wrap those directly?– vidarlo
Jul 19 at 15:11
Why does not
apt upgrade suffice? Also remember that apt is a front end for various other (apt-get and apt-cache comes to mind) programs, and as such it's maybe better to wrap those directly?– vidarlo
Jul 19 at 15:11
I did not understand your question
– V4riableZ
Jul 19 at 15:26
I did not understand your question
– V4riableZ
Jul 19 at 15:26
1
1
If you run
apt upgrade it will ask before performing any changes. Why would this not suffice?– vidarlo
Jul 19 at 15:42
If you run
apt upgrade it will ask before performing any changes. Why would this not suffice?– vidarlo
Jul 19 at 15:42
1
1
@vidario is trying to say that if you run:
sudo apt update && sudo apt upgrade, you will experience the behavior you have described. If you run sudo apt update && sudo apt upgrade -y, you will automatically install updates and it will not ask you for confirmation. It's unclear what you're asking to fix, or what your ultimate goal is.– earthmeLon
Jul 19 at 16:06
@vidario is trying to say that if you run:
sudo apt update && sudo apt upgrade, you will experience the behavior you have described. If you run sudo apt update && sudo apt upgrade -y, you will automatically install updates and it will not ask you for confirmation. It's unclear what you're asking to fix, or what your ultimate goal is.– earthmeLon
Jul 19 at 16:06
1
1
Please provide us about your script to auto-update or auto-uprade of apt?
– abu-ahmed al-khatiri
Jul 19 at 16:32
Please provide us about your script to auto-update or auto-uprade of apt?
– abu-ahmed al-khatiri
Jul 19 at 16:32
|
show 2 more comments
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1159482%2fbash-help-ubuntu%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1159482%2fbash-help-ubuntu%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why does not
apt upgradesuffice? Also remember thataptis a front end for various other (apt-getandapt-cachecomes to mind) programs, and as such it's maybe better to wrap those directly?– vidarlo
Jul 19 at 15:11
I did not understand your question
– V4riableZ
Jul 19 at 15:26
1
If you run
apt upgradeit will ask before performing any changes. Why would this not suffice?– vidarlo
Jul 19 at 15:42
1
@vidario is trying to say that if you run:
sudo apt update && sudo apt upgrade, you will experience the behavior you have described. If you runsudo apt update && sudo apt upgrade -y, you will automatically install updates and it will not ask you for confirmation. It's unclear what you're asking to fix, or what your ultimate goal is.– earthmeLon
Jul 19 at 16:06
1
Please provide us about your script to auto-update or auto-uprade of apt?
– abu-ahmed al-khatiri
Jul 19 at 16:32