10.10: shell script

Asked by peter on 2010-12-29

Hi

I have a shell script with the following lines:

echo 'Apt-get'
echo '---------'
sudo apt-get update
sudo apt-get upgrade
read i

I created a launcher, but the script doesn't run. I'll get the following error message:

There was an error creating the child process for this terminal
Failed to execute child process "/home/peter/OwnData/Sys_Admin/Shell_Scripts/Apt-get/apt-get" (Permission denied)

I can run the script in a terminal, but not in a launcher.

What can I do to run it with a launcher? Thanks in advance.
Peter

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Solved by:
peter
Solved:
2010-12-30
Last query:
2010-12-30
Last reply:
2010-12-29
Helder Mendes (heldermendes) said : #1

Hi there,

Did you launch this script with sudo?

peter (peter-neuweiler) said : #2

Thanks, Helder, this solved the problem. But now I have another problem:

The script opens and closes immediately. Do you have an idea? Thanks.
Peter

echo uses "s and not 's

You should also add a line at the top, reading:

#!/bin/bash

You also need to run:

chmod +x yoirfile

To mark it as executable as currently it sounds like you havent done this, otherwise it looks fine

If you use:

sudo apt-get -y upgrade

You will not be asked to confirm the download, it will just be done

peter (peter-neuweiler) said : #4

Thanks. The problem has solved.
Peter