Finding about which OS is running via shell script
Tom H
tomh0665 at gmail.com
Sat Apr 27 09:34:11 UTC 2013
On Fri, Apr 26, 2013 at 11:44 PM, Bill Dengler(arch Gnu/Linux)
<billkd2008 at gmail.com> wrote:
>
> ...
> #Debian based systems
> which apt-get &> /dev/null
> if [ $? == 0 ]
> then
> exec apt-get --fix-missing --force-yes -qqqqq -yy install $@
> fi
> #fedora/red hat/CENT OS
> which yum &> /dev/null
> if [ $? == 0 ]
> then
> exec yum -y install $@ &> /dev/null
> fi
> ...
Except that you can have, for example, yum installed on Ubuntu or
apt-get installed on Fedora.
More information about the ubuntu-users
mailing list