[SATLUG] Running a script in CLI
leon36 at gmail.com
Fri Jan 11 11:13:54 CST 2008
herb cee wrote:
> Samuel Leon wrote:
>> herb cee wrote:
>>> I can't seem to find a comment on this question:
>>> If I want to run a script in the CLI that contains lines such as this:
>>> sudo apt-get install vlc
>>> and I already have VLC installed should I comment that line out or
>>> does it not hurt anything to just run the script as is?
>> No, running a command to install a package that is already installed
>> will result in nothing, no error and no extra prompt. I would
>> recommend using aptitude instead of apt-get though. It handles
>> dependency install and removal better.
>> For example, if you install packageA and packageA depends on packageB
>> and packageC both apt-get and aptitude will install the extra
>> dependency packages but "apt-get remove packageA" will result in only
>> packageA being removed and dependency packageB & C being left behind.
>> "aptitude remove packageA" will result in all the packages that were
>> installed with it being removed as well as long as they don't have any
>> packages depending on them also.
>> Also if this is just a script to install packages, you don't have to
>> have it formated as:
>> apt-get install packageA
>> apt-get install packageB
>> apt-get install packageC
>> apt-get install packageA packageB packageC
>> will do the same.
> Ok thanks Sam here is why I asked the question:
> This is what you get:
> # Medibuntu repository (Multimedia, Entertainment & Distractions In
> Ubuntu) is a repository of packages that cannot be included into the
> Ubuntu distribution for legal reasons (copyright, license, patent, etc).
> # win32 codecs (divx, xvid etc) and DVD support globally
> # Firefox support for Flash, Java, MPEG, DVD, DivX support
> # Google Earth
> # RAR compressor/decompressor
> # Compiz Config Settings Manager
> # Ubuntu Tweak
> # media player similar to KDE’s Amarok but for Gnome
> # MPlayer and VLC video players
> # SSH Server to allow you to connect remotely to your computer
> # The ability to listen and rip Internet radio stations
> # More codecs
> Get the script:
> |$ wget http://www.linuxlove.org/stuff/postinstall.sh|
> Edit and add/remove things you need/don’t need (add a ‘#’ in front of
> the line installing what you don’t want):
> |$ nano -w postinstall.sh|
> Run the script:
> |$ chmod +x postinstall.sh
> $ ./postinstall
> |So I DLed the script from the url above and in looking at it i realized
> I was sure about some things but not all to '#' out. I'm new and do not
> always understand when looking at commands how the hell Linux knows what
> to do from the command, so makes me nervous.
> Thanks for the info.
You can also check out the ubuntu help site for help with installing
common things like video codecs and stuff:
It usually gives a better description of what you are going. I
personally keep a text file of all the packages that I have installed on
my debian system (about 75). Then if I ever need to reinstall or
install on a different computer I just type in "sudo aptitude install"
and then paste in the huge list of packages after that and hit enter.
But scripts are fine too. Oh and I see that the script installed
"msttcorefonts" which is a set of text fonts from microsoft. I really
hate the way they look on linux, just a word of warning ;)
More information about the SATLUG