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;









1

















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")










share|improve this question























  • 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











  • I did not understand your question

    – V4riableZ
    Jul 19 at 15:26






  • 1





    If you run apt upgrade it 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 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





    Please provide us about your script to auto-update or auto-uprade of apt?

    – abu-ahmed al-khatiri
    Jul 19 at 16:32

















1

















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")










share|improve this question























  • 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











  • I did not understand your question

    – V4riableZ
    Jul 19 at 15:26






  • 1





    If you run apt upgrade it 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 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





    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








1








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")










share|improve this question

















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






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








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 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






  • 1





    If you run apt upgrade it 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 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





    Please provide us about your script to auto-update or auto-uprade of apt?

    – abu-ahmed al-khatiri
    Jul 19 at 16:32












  • 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











  • I did not understand your question

    – V4riableZ
    Jul 19 at 15:26






  • 1





    If you run apt upgrade it 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 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





    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










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
);



);














draft saved

draft discarded
















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
















draft saved

draft discarded















































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.




draft saved


draft discarded














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





















































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









Popular posts from this blog

Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü