If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

hi everyone i would like to wright some sort of script that will update my distro. then after the update is complete. to shut down the system.

i know its

Code:

sudo dnf -y update

to update the system via terminal

im not sure how to properly shut down the system via terminal.

did you try looking ANYTHING up? maybe putting 'how to shutdown linux from terminal" into google and pressing enter? you might have then run across the 'shutdown" command, and guess what that does? it SHUTS DOWN the system! WOW!

or how to combine them in a script to achieve the desired objective

you put the commands into a file. make the file executable. then run it.

im running fedora 28.

im not exactly new to linux but i am realtivly new to linux programing i have had some visual basic 6.0 training about 11 years ago but i haven't coded since

did you try looking ANYTHING up? maybe putting 'how to shutdown linux from terminal" into google and pressing enter? you might have then run across the 'shutdown" command, and guess what that does? it SHUTS DOWN the system! WOW!

you put the commands into a file. make the file executable. then run it.

putting two lines into a text file isnt 'programming"

wow just exactly do you think im asking for i know how to shutdown via termianl on debian systems sudo shutdown now.

what i was asking for was how do you combine the two commands in such a way that the shutdown command is issued after a successful update.

not to be condasended i find your attitude offensive because if i was a newcomer for the first time after reading your reply i wouldn't join because id be thinking everyone is like that

wow just exactly do you think im asking for i know how to shutdown via termianl on debian systems sudo shutdown now.

if you knew why did you first post say 'im not sure how to properly shut down the system via terminal."? or do you think no one can read things youve posted before?

what i was asking for was how do you combine the two commands in such a way that the shutdown command is issued after a successful update.

guess you missed the millions of bash scripting tutorials on the internet, then. heres a handy guide:

put the update command FIRST

put the shutdown command SECOND

guess what happens? the first command runs FIRST and the second command runs AFTER it. hope your years of programming have prepared you for that.

not to be condasended i find your attitude offensive because if i was a newcomer for the first time after reading your reply i wouldn't join because id be thinking everyone is like that

Sent from my WAS-LX1A using Tapatalk

what does 'condasended" mean? cant find that word in the dictionary, or is it more of the way your going to 'wright" (did you mean WRITE?) a script? and if you dont like it go to another forum where theyll babysit you.