[SATLUG] Running a script in CLI

Wayne Walker wwalker at bybent.com
Fri Jan 11 10:27:39 CST 2008


On Thu, Jan 10, 2008 at 06:21:48PM -0600, 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?
> Thanks
> herb

I would:

dpkg -l vlc > /dev/nul 2>&1 || sudo apt-get install vlc

This will see if it's installed and only run apt-get if it's not already
installed


-- 

Wayne Walker

wwalker at bybent.com                    Do you use Linux?!
http://www.bybent.com                 Get Counted!  http://counter.li.org/
Perl - http://www.perl.org/           Perl User Groups - http://www.pm.org/
Jabber:  wwalker at jabber.bybent.com   AIM:     lwwalkerbybent
IRC:     wwalker on freenode.net


More information about the SATLUG mailing list