Autor Tópico: Repetir menu de script, como?  (Lida 3246 vezes)

Offline hraposo

  • Usuário Ubuntu
  • *
  • Mensagens: 343
    • Ver perfil
    • Página Pessoal Hélder Raposo
Repetir menu de script, como?
« Online: 13 de Agosto de 2007, 19:00 »
TENHO UM SCRIPT QUE É MAIS OU MENOS ISTO:

Código: [Selecionar]
#!/bin/bash
# script.sh
#gnome-terminal
#xterm
eco ESCOLHA A OPÇÃO?
echo "1 ) ACTUALIZAR SOURCE LIST."
echo "2 ) INSTALAR PROGRAMAS."
echo "3 ) CONFIGURAR O REDWRITE DOS DISCO ."
echo "4 ) INSTALAR DRIVERS NVIDIA ."
echo "5 ) SAIR ."
echo -n "Select an Option: "
read option
case "$option" in
1 )

echo ISTO VAI CONFIGURAR O REPOSITÓRIO!
wget http://192.168.1.4/apache/software/linux/gupsy/sources.list
mv /etc/apt/sources.list /etc/apt/sources.list_backtup
cp -r sources.list /etc/apt/sources.list
#echo "deb http://mirror3.ubuntulinux.nl/ edgy-seveas freenx" >> /etc/apt/sources.list
#echo "deb http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
#echo "deb-src http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
echo "deb http://ftp.br.debian.org/debian/ etch main contrib non-free" >> /etc/apt/sources.list
echo "deb http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
echo "deb-src http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
rm -rf sources.list
echo FIM, DE ACTUALIZAÇÃO

;;

2 )
echo INSTALAR ALGUNS PROGRAMAS E CODECS
apt-get install clamav elisa realplayer bluefish restricted-manager freespeak alltray filezilla gftp opera amsn thunderbird pidgin liferea gthumb xchat acroread brasero gomebacker gtk-recordmydesktop soundconverter mplayer gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecs mplayer flashplayer-nonfree flashplugin-nonfree banshee sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin gdesklets gdesklets-data
wget http://www9.limewire.com/download/LimeWireLinux.deb
wget http://dl.google.com/linux/deb/pool/non-free/g/google-desktop-linux/google-desktop-linux_current_i386.deb
wget http://88.198.54.112/pub/getdeb/pd/pdfedit_0.3.1-1~getdeb1_i386.deb
wget http://web.telia.com/~u88005282/sum/archive/deb/startupmanager_1.0.2-2_all.deb
wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.deb
dpkg -i picasa_2.2.2820-5_i386.deb
dpkg -i LimeWireLinux.deb
dpkg -i google-desktop-linux_current_i386.deb
dpkg -i pdfedit_0.3.1-1~getdeb1_i386.deb
dpk -i startupmanager_1.0.2-2_all.deb
rm -rf *.deb
echo FIM, DA INSTALAÇÃO

;;
3 )

echo AGORA CONFIGURAR O REDWRITE DOS DISCOS
#get all user interaction done right away
echo "deb http://givre.cabspace.com/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
echo "deb http://ntfs-3g.sitesweetsite.info/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
echo "deb http://flomertens.keo.in/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
apt-get install libfuse2 fuse-utils ntfs-3g
echo 'feito'
wget http://kent.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.1.tar.gz
tar zxvf fuse-2.6.1.tar.gz
cd fuse-2.6.1
./configure
make
make install
echo "fuse" >> /etc/modules
modprobe fuse
echo "/dev/hda5 /media/hda5 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
echo "/dev/hda1 /media/hda1 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
umount -a
mount -a
echo FIM,COMENTE AS ANTIGAS LINHAS DE HDA1 E HDA5 E FAÇA REBOOT

;;

4 )

echo VAMOS INSTALAR OS DRIVERS NVIDIA
wget http://albertomilone.com/ubuntu/nvidia/scripts/envy_0.9.7-0ubuntu6_all.deb
dpkg -i envy_0.9.7-0ubuntu6_all.deb
apt-get install -f
rm -rf *.deb
envy -t
;;

5 )

exit 0
;;
esac

Agora precisava de saber quais os comandos de forma a que o menu do script volte a surgir quando terminar uma opção.

Alguém pode ajudar?

Offline clcampos

  • Administrador
  • Usuário Ubuntu
  • *****
  • Mensagens: 10.790
  • .:: User Linux #439596 ::.
    • Ver perfil
Re: Repetir menu de script, como?
« Resposta #1 Online: 13 de Agosto de 2007, 20:40 »
Você pode chamar a própria rotina como último comando de cada uma das opções, exceto a 5, ou então pode colocar a estrutura dentro de um laço.

Código: [Selecionar]
while true
do
     comando 1
     comando 2
     comando 3
     comando 4
              .
              .
              .

     comando n
done

E na opção de encerrar seu laço você usa um break. Estas são as formas mais fáceis, existem outras formas até mais elegantes, mas não tão fáceis.
Cristiano/Timóteo - MG
.: Como Fazer Perguntas de Forma Inteligente :.                
Com dúvida? pesquise!

alarcon

  • Visitante
Re: Repetir menu de script, como?
« Resposta #2 Online: 17 de Agosto de 2007, 15:28 »
Ainda não encontrei algo, mais elegante, para repetir sua pergunta inicial, mas refiz este seu mesmo script assim:

Código: [Selecionar]
#!/bin/bash
# script.sh
#gnome-terminal
#xterm

echo -e "\n ESCOLHA A OPÇÃO:\n  - '1' ACTUALIZAR SOURCE LIST\n  - '2' INSTALAR PROGRAMAS\n  - '3' CONFIGURAR O REDWRITE DOS DISCO\n  - '4' INSTALAR DRIVERS NVIDIA\n  - '5' SAIR"
read -p "   - " -n1 choose;
echo ''
if [ "$choose" = "1" ]; then
DE="source_list";
elif [ "$choose" = "2" ]; then
DE="programas";
elif [ "$choose" = "3" ]; then
DE="redwrite";
elif [ "$choose" = "4" ]; then
DE="nvidia";
elif [ "$choose" = "5" ]; then
DE="sair"
fi


if [ "$DE" = "source_list" ]; then

echo "ISTO VAI CONFIGURAR O REPOSITÓRIO!"
wget http://192.168.1.4/apache/software/linux/gupsy/sources.list
mv /etc/apt/sources.list /etc/apt/sources.list_backtup
cp -r sources.list /etc/apt/sources.list
#echo "deb http://mirror3.ubuntulinux.nl/ edgy-seveas freenx" >> /etc/apt/sources.list
#echo "deb http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
#echo "deb-src http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
echo "deb http://ftp.br.debian.org/debian/ etch main contrib non-free" >> /etc/apt/sources.list
echo "deb http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
echo "deb-src http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
rm -rf sources.list
echo "FIM, DE ACTUALIZAÇÃO"


elif [ "$DE" = "programas" ]; then

echo "INSTALAR ALGUNS PROGRAMAS E CODECS"
apt-get install clamav elisa realplayer bluefish restricted-manager freespeak alltray filezilla gftp opera amsn thunderbird pidgin liferea gthumb xchat acroread brasero gomebacker gtk-recordmydesktop soundconverter mplayer gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecs mplayer flashplayer-nonfree flashplugin-nonfree banshee sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin gdesklets gdesklets-data
wget http://www9.limewire.com/download/LimeWireLinux.deb
wget http://dl.google.com/linux/deb/pool/non-free/g/google-desktop-linux/google-desktop-linux_current_i386.deb
wget http://88.198.54.112/pub/getdeb/pd/pdfedit_0.3.1-1~getdeb1_i386.deb
wget http://web.telia.com/~u88005282/sum/archive/deb/startupmanager_1.0.2-2_all.deb
wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.deb
dpkg -i picasa_2.2.2820-5_i386.deb
dpkg -i LimeWireLinux.deb
dpkg -i google-desktop-linux_current_i386.deb
dpkg -i pdfedit_0.3.1-1~getdeb1_i386.deb
dpk -i startupmanager_1.0.2-2_all.deb
rm -rf *.deb
echo "FIM, DA INSTALAÇÃO"


elif [ "$DE" = "redwrite" ]; then

echo "AGORA CONFIGURAR O REDWRITE DOS DISCOS"
get all user interaction done right away
echo "deb http://givre.cabspace.com/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
echo "deb http://ntfs-3g.sitesweetsite.info/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
echo "deb http://flomertens.keo.in/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
apt-get install libfuse2 fuse-utils ntfs-3g
echo 'feito'
wget http://kent.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.1.tar.gz
tar zxvf fuse-2.6.1.tar.gz
cd fuse-2.6.1
./configure
make
make install
echo "fuse" >> /etc/modules
modprobe fuse
echo "/dev/hda5 /media/hda5 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
echo "/dev/hda1 /media/hda1 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
umount -a
mount -a
echo "FIM,COMENTE AS ANTIGAS LINHAS DE HDA1 E HDA5 E FAÇA REBOOT"


elif [ "$DE" = "nvidia" ]; then

echo "VAMOS INSTALAR OS DRIVERS NVIDIA"
wget http://albertomilone.com/ubuntu/nvidia/scripts/envy_0.9.7-0ubuntu6_all.deb
dpkg -i envy_0.9.7-0ubuntu6_all.deb
apt-get install -f
rm -rf *.deb
envy -t

elif [ "$DE" = "sair" ]; then

echo "SAIR SEM FAZER NADA"

exit 0

fi

exit 0

Me diga o que achou.

Offline clcampos

  • Administrador
  • Usuário Ubuntu
  • *****
  • Mensagens: 10.790
  • .:: User Linux #439596 ::.
    • Ver perfil
Re: Repetir menu de script, como?
« Resposta #3 Online: 17 de Agosto de 2007, 15:42 »
Se você procura elegancia alarcon use o case no lugar do if.
Cristiano/Timóteo - MG
.: Como Fazer Perguntas de Forma Inteligente :.                
Com dúvida? pesquise!

alarcon

  • Visitante
Re: Repetir menu de script, como?
« Resposta #4 Online: 17 de Agosto de 2007, 15:53 »
Se você procura elegancia alarcon use o case no lugar do if.

Bom se este script aqui é elegante ou não, eu não sei, mas veja se é isso que você estava pretendendo caro hraposo.

Clcampos ainda não trabalhei com o case em shell script, na verdade vou aprendendo na base da observação de alguns scripts mesmo, o kurumin em especial me ajudou muito nisso.

OBS: neste último script ele repete a pergunta inicial mostrando novamente as opções.

Código: [Selecionar]
#!/bin/bash
# script.sh
#gnome-terminal
#xterm

choose=0

until [ $choose = "5" ]; do

echo -e "\n ESCOLHA A OPÇÃO:\n  - '1' ACTUALIZAR SOURCE LIST\n  - '2' INSTALAR PROGRAMAS\n  - '3' CONFIGURAR O REDWRITE DOS DISCO\n  - '4' INSTALAR DRIVERS NVIDIA\n  - '5' SAIR"
read -p "   - " -n1 choose;
echo ''
if [ "$choose" = "1" ]; then
DE="source_list";
elif [ "$choose" = "2" ]; then
DE="programas";
elif [ "$choose" = "3" ]; then
DE="redwrite";
elif [ "$choose" = "4" ]; then
DE="nvidia";
elif [ "$choose" = "5" ]; then
DE="sair"
fi


if [ "$DE" = "source_list" ]; then

echo "ISTO VAI CONFIGURAR O REPOSITÓRIO!"
wget http://192.168.1.4/apache/software/linux/gupsy/sources.list
mv /etc/apt/sources.list /etc/apt/sources.list_backtup
cp -r sources.list /etc/apt/sources.list
#echo "deb http://mirror3.ubuntulinux.nl/ edgy-seveas freenx" >> /etc/apt/sources.list
#echo "deb http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
#echo "deb-src http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
echo "deb http://ftp.br.debian.org/debian/ etch main contrib non-free" >> /etc/apt/sources.list
echo "deb http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
echo "deb-src http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
rm -rf sources.list
echo "FIM, DE ACTUALIZAÇÃO"


elif [ "$DE" = "programas" ]; then

echo "INSTALAR ALGUNS PROGRAMAS E CODECS"
apt-get install clamav elisa realplayer bluefish restricted-manager freespeak alltray filezilla gftp opera amsn thunderbird pidgin liferea gthumb xchat acroread brasero gomebacker gtk-recordmydesktop soundconverter mplayer gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecs mplayer flashplayer-nonfree flashplugin-nonfree banshee sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin gdesklets gdesklets-data
wget http://www9.limewire.com/download/LimeWireLinux.deb
wget http://dl.google.com/linux/deb/pool/non-free/g/google-desktop-linux/google-desktop-linux_current_i386.deb
wget http://88.198.54.112/pub/getdeb/pd/pdfedit_0.3.1-1~getdeb1_i386.deb
wget http://web.telia.com/~u88005282/sum/archive/deb/startupmanager_1.0.2-2_all.deb
wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.deb
dpkg -i picasa_2.2.2820-5_i386.deb
dpkg -i LimeWireLinux.deb
dpkg -i google-desktop-linux_current_i386.deb
dpkg -i pdfedit_0.3.1-1~getdeb1_i386.deb
dpk -i startupmanager_1.0.2-2_all.deb
rm -rf *.deb
echo "FIM, DA INSTALAÇÃO"


elif [ "$DE" = "redwrite" ]; then

echo "AGORA CONFIGURAR O REDWRITE DOS DISCOS"
get all user interaction done right away
echo "deb http://givre.cabspace.com/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
echo "deb http://ntfs-3g.sitesweetsite.info/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
echo "deb http://flomertens.keo.in/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
apt-get install libfuse2 fuse-utils ntfs-3g
echo 'feito'
wget http://kent.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.1.tar.gz
tar zxvf fuse-2.6.1.tar.gz
cd fuse-2.6.1
./configure
make
make install
echo "fuse" >> /etc/modules
modprobe fuse
echo "/dev/hda5 /media/hda5 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
echo "/dev/hda1 /media/hda1 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
umount -a
mount -a
echo "FIM,COMENTE AS ANTIGAS LINHAS DE HDA1 E HDA5 E FAÇA REBOOT"


elif [ "$DE" = "nvidia" ]; then

echo "VAMOS INSTALAR OS DRIVERS NVIDIA"
wget http://albertomilone.com/ubuntu/nvidia/scripts/envy_0.9.7-0ubuntu6_all.deb
dpkg -i envy_0.9.7-0ubuntu6_all.deb
apt-get install -f
rm -rf *.deb
envy -t

elif [ "$DE" = "sair" ]; then

echo "SAIR SEM FAZER NADA"

exit 0

fi

done

Ao executar o script aparecerá no terminal isso:

Citar
ESCOLHA A OPÇÃO:
  - '1' ACTUALIZAR SOURCE LIST
  - '2' INSTALAR PROGRAMAS
  - '3' CONFIGURAR O REDWRITE DOS DISCO
  - '4' INSTALAR DRIVERS NVIDIA
  - '5' SAIR
   -

Onde tem um traço " - " no final é onde está o cursor piscando pronto para receber e ler a opção (1, 2, 3, 4 ou 5)
« Última modificação: 17 de Agosto de 2007, 16:28 por alarcon »

Offline clcampos

  • Administrador
  • Usuário Ubuntu
  • *****
  • Mensagens: 10.790
  • .:: User Linux #439596 ::.
    • Ver perfil
Re: Repetir menu de script, como?
« Resposta #5 Online: 17 de Agosto de 2007, 16:50 »
alarcon o script esta ai com o case no local do if. Entenda que não alterei nada no script (a não ser consistir quando digita-se uma opção inválida - diferente de 1 a 5), e que eu faria outras alterações para usá-lo, como por exemplo usar o zenity. Mas de qualquer forma, apenas para exemplificação do uso do comando (case), e sem me preocupar em rodar, ele esta ai:

Código: [Selecionar]
#!/bin/bash
# script.sh
#gnome-terminal
#xterm
#
# Alterado por Cristiano


choose=0

until [ $choose = "5" ]; do

echo -e "\n ESCOLHA A OPÇÃO:\n  - '1' ACTUALIZAR SOURCE LIST\n  - '2' INSTALAR PROGRAMAS\n  - '3' CONFIGURAR O REDWRITE DOS DISCO\n  - '4' INSTALAR DRIVERS NVIDIA\n  - '5' SAIR\n ESCOLHA SUA OPÇÃO: \c"
read choose

        case "$choose" in
     "1")
                echo "ISTO VAI CONFIGURAR O REPOSITÓRIO!"
                wget http://192.168.1.4/apache/software/linux/gupsy/sources.list
                mv /etc/apt/sources.list /etc/apt/sources.list_backtup
                cp -r sources.list /etc/apt/sources.list
                #echo "deb http://mirror3.ubuntulinux.nl/ edgy-seveas freenx" >> /etc/apt/sources.list
                #echo "deb http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
                #echo "deb-src http://www.agrassi.org/ubuntu feisty adunanza" >> /etc/apt/sources.list
                echo "deb http://ftp.br.debian.org/debian/ etch main contrib non-free" >> /etc/apt/sources.list
                echo "deb http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
                echo "deb-src http://packages.freecontrib.org/ubuntu/plf edgy-plf free non-free" >> /etc/apt/sources.list
                rm -rf sources.list
                echo "FIM, DE ACTUALIZAÇÃO";;

     "2")
                echo "INSTALAR ALGUNS PROGRAMAS E CODECS"
                apt-get install clamav elisa realplayer bluefish restricted-manager freespeak alltray filezilla gftp opera amsn thunderbird pidgin liferea gthumb xchat acroread brasero gomebacker gtk-recordmydesktop soundconverter mplayer gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecs mplayer flashplayer-nonfree flashplugin-nonfree banshee sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin sun-java6-jre sun-java6-fonts sun-java6-bin sun-java6-plugin gdesklets gdesklets-data
                wget http://www9.limewire.com/download/LimeWireLinux.deb
                wget http://dl.google.com/linux/deb/pool/non-free/g/google-desktop-linux/google-desktop-linux_current_i386.deb
                wget http://88.198.54.112/pub/getdeb/pd/pdfedit_0.3.1-1~getdeb1_i386.deb
                wget http://web.telia.com/~u88005282/sum/archive/deb/startupmanager_1.0.2-2_all.deb
                wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.deb
                dpkg -i picasa_2.2.2820-5_i386.deb
                dpkg -i LimeWireLinux.deb
                dpkg -i google-desktop-linux_current_i386.deb
                dpkg -i pdfedit_0.3.1-1~getdeb1_i386.deb
                dpk -i startupmanager_1.0.2-2_all.deb
                rm -rf *.deb
                echo "FIM, DA INSTALAÇÃO";;

             "3")
                echo "AGORA CONFIGURAR O REDWRITE DOS DISCOS"
                get all user interaction done right away
                echo "deb http://givre.cabspace.com/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
                echo "deb http://ntfs-3g.sitesweetsite.info/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
                echo "deb http://flomertens.keo.in/ubuntu/ dapper main main-all" >> /etc/apt/sources.list
                apt-get install libfuse2 fuse-utils ntfs-3g
                echo 'feito'
                wget http://kent.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.1.tar.gz
                tar zxvf fuse-2.6.1.tar.gz
                cd fuse-2.6.1
                ./configure
                make
                make install
                echo "fuse" >> /etc/modules
                modprobe fuse
                echo "/dev/hda5 /media/hda5 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
                echo "/dev/hda1 /media/hda1 ntfs-3g defaults,silent,user,auto,umask=0,locale=pt_PT.utf8 0 0" >> /etc/fstab
                umount -a
                mount -a
                echo "FIM,COMENTE AS ANTIGAS LINHAS DE HDA1 E HDA5 E FAÇA REBOOT";;

             "4")
                echo "VAMOS INSTALAR OS DRIVERS NVIDIA"
                wget http://albertomilone.com/ubuntu/nvidia/scripts/envy_0.9.7-0ubuntu6_all.deb
                dpkg -i envy_0.9.7-0ubuntu6_all.deb
                apt-get install -f
                rm -rf *.deb
                envy -t;;

             "5")
break;;
             *)
echo -e "\033[1mEsta opção não é válida\033[0m. Tecle <ENTER> para continuar."
                read ESPERA;;
esac
done
« Última modificação: 17 de Agosto de 2007, 16:54 por clcampos »
Cristiano/Timóteo - MG
.: Como Fazer Perguntas de Forma Inteligente :.                
Com dúvida? pesquise!