10.04: shell script

Asked by peter

Hello

I've the following shell script (only two lines):

sudo apt-get update
sudo apt-get upgrade

Every sudo needs the password. How can I integrate the password in the shell script? Thanks in advance.
Peter

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
peter
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Run the script with sudo and it will authenticate to the sudo commands in the script. I use similar scripts.

Revision history for this message
peter (peter-neuweiler) said :
#2

Hi

I created a launcher with the following command line:

sudo shell-script

And the shell-script contains one line: sudo apt-get update

But the louncher doesn't work. I guess I got something wrong. Can you give me an eyample, please? Thanks!
Peter

Revision history for this message
peter (peter-neuweiler) said :
#3

The problem has solved. Thanks a lot.
Peter

Revision history for this message
Ian Fleming (iflema-deactivatedaccount) said :
#4

hi peter.....

try gksu shell-script for use with a launcher/shortcut.