script file correction











up vote
-1
down vote

favorite












I wrote this simple script but I can not make it install everything by copying it to the terminal. What am I doing wrong? Or do I have something written wrong?



sudo apt update && 
sudo apt -y install ubuntu-restricted-extras &&
sudo apt update &&
sudo apt -y full-upgrade &&
sudo apt update &&
sudo apt -y install build-essential libssl-dev &&
sudo apt -y build-dep avrdude &&
sudo apt -y install apt-transport-https &&
dpkg -s apt-transport-https > /dev/null || bash -c "sudo apt-get update; sudo apt-get install apt-transport-https -y" &&
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add - &&
sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian cosmic non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list' &&
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&
echo "deb [arch=amd64] https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skypeforlinux.list &&
wget -q -O - https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add - &&
sudo apt update &&
sudo apt -y install skypeforlinux &&
sudo apt -y install virtualbox-5.2 &&
sudo apt -y install google-erath-pro-stable









share|improve this question









New contributor




ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Well, what does the output say?
    – user535733
    Nov 19 at 19:44






  • 3




    This script lacks a shebang. Don’t use sudo in a script, rather run the whole script as root. Why do you apt update four or even five times?
    – dessert
    Nov 19 at 19:47












  • @dessert shebang is not a requirement, and especially not when the script i copied into the terminal, as OP writes.
    – Soren A
    Nov 19 at 19:51






  • 2




    @SorenA I don’t say it is, but it’s certainly a good practice, especially for a beginner.
    – dessert
    Nov 19 at 19:55






  • 2




    Please edit to include any error messages you receive, plus any other relevant info, like what the script is intended to do.
    – wjandrea
    Nov 19 at 20:16

















up vote
-1
down vote

favorite












I wrote this simple script but I can not make it install everything by copying it to the terminal. What am I doing wrong? Or do I have something written wrong?



sudo apt update && 
sudo apt -y install ubuntu-restricted-extras &&
sudo apt update &&
sudo apt -y full-upgrade &&
sudo apt update &&
sudo apt -y install build-essential libssl-dev &&
sudo apt -y build-dep avrdude &&
sudo apt -y install apt-transport-https &&
dpkg -s apt-transport-https > /dev/null || bash -c "sudo apt-get update; sudo apt-get install apt-transport-https -y" &&
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add - &&
sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian cosmic non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list' &&
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&
echo "deb [arch=amd64] https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skypeforlinux.list &&
wget -q -O - https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add - &&
sudo apt update &&
sudo apt -y install skypeforlinux &&
sudo apt -y install virtualbox-5.2 &&
sudo apt -y install google-erath-pro-stable









share|improve this question









New contributor




ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Well, what does the output say?
    – user535733
    Nov 19 at 19:44






  • 3




    This script lacks a shebang. Don’t use sudo in a script, rather run the whole script as root. Why do you apt update four or even five times?
    – dessert
    Nov 19 at 19:47












  • @dessert shebang is not a requirement, and especially not when the script i copied into the terminal, as OP writes.
    – Soren A
    Nov 19 at 19:51






  • 2




    @SorenA I don’t say it is, but it’s certainly a good practice, especially for a beginner.
    – dessert
    Nov 19 at 19:55






  • 2




    Please edit to include any error messages you receive, plus any other relevant info, like what the script is intended to do.
    – wjandrea
    Nov 19 at 20:16















up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I wrote this simple script but I can not make it install everything by copying it to the terminal. What am I doing wrong? Or do I have something written wrong?



sudo apt update && 
sudo apt -y install ubuntu-restricted-extras &&
sudo apt update &&
sudo apt -y full-upgrade &&
sudo apt update &&
sudo apt -y install build-essential libssl-dev &&
sudo apt -y build-dep avrdude &&
sudo apt -y install apt-transport-https &&
dpkg -s apt-transport-https > /dev/null || bash -c "sudo apt-get update; sudo apt-get install apt-transport-https -y" &&
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add - &&
sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian cosmic non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list' &&
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&
echo "deb [arch=amd64] https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skypeforlinux.list &&
wget -q -O - https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add - &&
sudo apt update &&
sudo apt -y install skypeforlinux &&
sudo apt -y install virtualbox-5.2 &&
sudo apt -y install google-erath-pro-stable









share|improve this question









New contributor




ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I wrote this simple script but I can not make it install everything by copying it to the terminal. What am I doing wrong? Or do I have something written wrong?



sudo apt update && 
sudo apt -y install ubuntu-restricted-extras &&
sudo apt update &&
sudo apt -y full-upgrade &&
sudo apt update &&
sudo apt -y install build-essential libssl-dev &&
sudo apt -y build-dep avrdude &&
sudo apt -y install apt-transport-https &&
dpkg -s apt-transport-https > /dev/null || bash -c "sudo apt-get update; sudo apt-get install apt-transport-https -y" &&
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add - &&
sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian cosmic non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list' &&
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&
echo "deb [arch=amd64] https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skypeforlinux.list &&
wget -q -O - https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add - &&
sudo apt update &&
sudo apt -y install skypeforlinux &&
sudo apt -y install virtualbox-5.2 &&
sudo apt -y install google-erath-pro-stable






command-line apt package-management 18.10






share|improve this question









New contributor




ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago









Charo

2,00021226




2,00021226






New contributor




ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 19 at 19:40









ElBarbas

11




11




New contributor




ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






ElBarbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    Well, what does the output say?
    – user535733
    Nov 19 at 19:44






  • 3




    This script lacks a shebang. Don’t use sudo in a script, rather run the whole script as root. Why do you apt update four or even five times?
    – dessert
    Nov 19 at 19:47












  • @dessert shebang is not a requirement, and especially not when the script i copied into the terminal, as OP writes.
    – Soren A
    Nov 19 at 19:51






  • 2




    @SorenA I don’t say it is, but it’s certainly a good practice, especially for a beginner.
    – dessert
    Nov 19 at 19:55






  • 2




    Please edit to include any error messages you receive, plus any other relevant info, like what the script is intended to do.
    – wjandrea
    Nov 19 at 20:16
















  • 1




    Well, what does the output say?
    – user535733
    Nov 19 at 19:44






  • 3




    This script lacks a shebang. Don’t use sudo in a script, rather run the whole script as root. Why do you apt update four or even five times?
    – dessert
    Nov 19 at 19:47












  • @dessert shebang is not a requirement, and especially not when the script i copied into the terminal, as OP writes.
    – Soren A
    Nov 19 at 19:51






  • 2




    @SorenA I don’t say it is, but it’s certainly a good practice, especially for a beginner.
    – dessert
    Nov 19 at 19:55






  • 2




    Please edit to include any error messages you receive, plus any other relevant info, like what the script is intended to do.
    – wjandrea
    Nov 19 at 20:16










1




1




Well, what does the output say?
– user535733
Nov 19 at 19:44




Well, what does the output say?
– user535733
Nov 19 at 19:44




3




3




This script lacks a shebang. Don’t use sudo in a script, rather run the whole script as root. Why do you apt update four or even five times?
– dessert
Nov 19 at 19:47






This script lacks a shebang. Don’t use sudo in a script, rather run the whole script as root. Why do you apt update four or even five times?
– dessert
Nov 19 at 19:47














@dessert shebang is not a requirement, and especially not when the script i copied into the terminal, as OP writes.
– Soren A
Nov 19 at 19:51




@dessert shebang is not a requirement, and especially not when the script i copied into the terminal, as OP writes.
– Soren A
Nov 19 at 19:51




2




2




@SorenA I don’t say it is, but it’s certainly a good practice, especially for a beginner.
– dessert
Nov 19 at 19:55




@SorenA I don’t say it is, but it’s certainly a good practice, especially for a beginner.
– dessert
Nov 19 at 19:55




2




2




Please edit to include any error messages you receive, plus any other relevant info, like what the script is intended to do.
– wjandrea
Nov 19 at 20:16






Please edit to include any error messages you receive, plus any other relevant info, like what the script is intended to do.
– wjandrea
Nov 19 at 20:16

















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',
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/3.0/"u003ecc by-sa 3.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
});


}
});






ElBarbas is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094312%2fscript-file-correction%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








ElBarbas is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















ElBarbas is a new contributor. Be nice, and check out our Code of Conduct.













ElBarbas is a new contributor. Be nice, and check out our Code of Conduct.












ElBarbas is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094312%2fscript-file-correction%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

Category:香港粉麵

List *all* the tuples!

Channel [V]