LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-01-2009, 08:39 AM   #1
redlinuxxx
LQ Newbie
 
Registered: Sep 2009
Location: Seaside Heights
Distribution: Debian Slimed Down :)
Posts: 26

Rep: Reputation: 15
Lightbulb Next step to make this script more efficient...?


I have just started learning shell scripts yestarday and want to tweak this so it automatically says yes to all questions of "are you sure?"
I understand programming concepts my problem is th syntax of shell scripting I dont know yet.

function delprog
{
program=program

echo -e "\n"
echo -n "What program to be Deleted Completely: "
read $program

sudo apt-get remove $program
sudo apt-get autoremove
}
 
Old 10-01-2009, 08:55 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Use apt-get's -y, --yes or --assume-yes option. It is detailed in the apt-get man page.
 
Old 10-01-2009, 09:42 AM   #3
redlinuxxx
LQ Newbie
 
Registered: Sep 2009
Location: Seaside Heights
Distribution: Debian Slimed Down :)
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks I dont no why I didnt know that was there I looked through the apt man pages before that definitely did the trick.
 
  


Reply

Tags
shell script



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS Step 6.7 - make headers_check fails ice13berg Linux From Scratch 7 01-07-2011 09:05 AM
Step by Step way to make SUSE 9.3 VMWARE ready ?? my-unix-dream Linux - Newbie 5 07-05-2005 09:18 PM
Step-by-step procedure to make a Live CD? kRu_ZaDeR Linux - General 3 03-28-2003 09:34 PM
help this to make this sed efficient plz doublefailure Programming 1 03-25-2002 06:57 AM
Any1 please make a step by step install of RH7.1 Simsala Linux - Software 5 08-17-2001 06:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration