Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
Pessoal estava estudando e a documentação do bash é muito extensão (pela sua complexidade) tenho a intensão de me aprofundar no assunto, mas tenho certa urgencia em pelo menos conseguir com um arquivo do bash acionar outro arquivo na minha máquina. Alguém não poderia dar uma mão pois fiz alguns testes e não rolou aqui. Valeu. 2006/9/8, Mikhail Koslowski [EMAIL PROTECTED]: [EMAIL PROTECTED]:~$ gcc alg alg: file not recognized: File format not recognized collect2: ld returned 1 exit status arquivos .c o gcc não compila sem extensao... haha. mas acho que isso é só por causa de ele ter a possibilidade de abrir mais de 1 tipo de arquivo. -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br -- -- - Petter R. Villa Real Silva -- Desenvolvedor Web Papyrus Desenvolvimento Web Powered by Java/Oracle PHP/MySQL - -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
Em Seg, 2006-09-11 às 08:19 -0300, Petter Rafael Villa Real escreveu: Pessoal estava estudando e a documentação do bash é muito extensão (pela sua complexidade) tenho a intensão de me aprofundar no assunto, mas tenho certa urgencia em pelo menos conseguir com um arquivo do bash acionar outro arquivo na minha máquina. Alguém não poderia dar uma mão pois fiz alguns testes e não rolou aqui. Valeu. Cara, cria um arquivo, digamos: teste Dá permissão de execução para esse arquivo: chmod +x teste Entra nele (pelo vi, gedit, ou qualquer editor) e digita: --INICIO-- #!/bin/sh echo Testando script... echo Executando comando qualquer do sistema operacional: dmesg | head echo Comando executado echo Atribuindo a saida de um comando a uma variavel: VARIAVEL=`uname -r` echo Estou usando a versão $VARIAVEL do linux echo echo Estude o diretorio /etc/init.d. Lá tem muitos scripts. echo echo Até mais... echo ---FIM-- Feche o editor e execute o script: ./teste T+, -- Jonh Wendell Santana Analista de Sistemas Site: http://www.bani.com.br MSN / Google Talk: [EMAIL PROTECTED] Linux User #114432 -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
Em Sex, 2006-09-08 às 17:10 -0300, Petter Rafael Villa Real escreveu: O Linux tem algum similar? Como é feito? Similar? Sinto lhe informar, tem não... Tem uma ferramenta MUITO MAIS poderosa, shell script. Google nele! -- Jonh Wendell Santana Analista de Sistemas Site: http://www.bani.com.br MSN / Google Talk: [EMAIL PROTECTED] Linux User #114432 -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
Bom temos o shell script basicamente a estrutura é a seguinda #!/bin/bash comandos salvar com a extensão .sh e para rodar ./nome.sh ou sh nome.sh :) outras informações google mesmo On 9/8/06, Jonh Wendell [EMAIL PROTECTED] wrote: Em Sex, 2006-09-08 às 17:10 -0300, Petter Rafael Villa Real escreveu: O Linux tem algum similar? Como é feito? Similar? Sinto lhe informar, tem não... Tem uma ferramenta MUITO MAIS poderosa, shell script. Google nele! -- Jonh Wendell Santana Analista de Sistemas Site: http://www.bani.com.br MSN / Google Talk: [EMAIL PROTECTED] Linux User #114432 -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br -- Bruno Seabra Mendoça Lima UFMA - Universidade Federal do Maranhão DEINF - Departamento de Informática LAbMint - Laboratorio de Midias Interativas Telefone: 3217-8239 -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
Faltou um chmod +x arquivo.sh para deixá-lo com permissões de execução :) []s 2006/9/8, Bruno Lima [EMAIL PROTECTED]: Bom temos o shell script basicamente a estrutura é a seguinda #!/bin/bash comandos salvar com a extensão .sh e para rodar ./nome.sh ou sh nome.sh :) outras informações google mesmo On 9/8/06, Jonh Wendell [EMAIL PROTECTED] wrote: Em Sex, 2006-09-08 às 17:10 -0300, Petter Rafael Villa Real escreveu: O Linux tem algum similar? Como é feito? Similar? Sinto lhe informar, tem não... Tem uma ferramenta MUITO MAIS poderosa, shell script. Google nele! -- Jonh Wendell Santana Analista de Sistemas Site: http://www.bani.com.br MSN / Google Talk: [EMAIL PROTECTED] Linux User #114432 -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br -- Bruno Seabra Mendoça Lima UFMA - Universidade Federal do Maranhão DEINF - Departamento de Informática LAbMint - Laboratorio de Midias Interativas Telefone: 3217-8239 -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br -- Bruno de Oliveira Abinader -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
ou pode roda-lo com o comando sh arquivo.sh :) sem as aspas viu :-P -- -- André Luis Frasnelli Tinoco alfatau at gmail dot com Secretaria de Estado de Educação do Distrito Federal -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
precisa ser arquivo.sh?? que eu, por exemplo, fiz um script pra abrir o quake com um negocio do som que tem que executar se nao fica sem som, carregando minhas cfgs e ajustando pra fullscreen com gama tal. eu só fiz o arquivo, que eu chamei de quake. salvei ele na pasta /uer/local/bin e dei um chmod +x nele -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
On 9/8/06, Mikhail Koslowski [EMAIL PROTECTED] wrote: precisa ser arquivo.sh?? que eu, por exemplo, fiz um script pra abrir o quake com um negocio do som que tem que executar se nao fica sem som, carregando minhas cfgs e ajustando pra fullscreen com gama tal. eu só fiz o arquivo, que eu chamei de quake. salvei ele na pasta /uer/local/bin e dei um chmod +x nele Linux não precisa da extensão (.sh, .exe, .etc).. isso eh somente para os seus olhos mesmo. -- ,= ,-_-. =. Licio Fernando [EMAIL PROTECTED], member.fsf.org} ((_/)o o(\_)) Jabber: [EMAIL PROTECTED] | I Seek You (Icq): 271062447 `-' (. . ) `-' Linux user: 343587 | Ubuntu - GNU/Linux \_/ http://www.licio.eti.br -BEGIN GEEK CODE BLOCK- Version: 3.1 GCM/CS/s/m d+(--) s: a-- C+++ UL+++ P++ L+++$ E W++ N+++ o K- w-- O M- V- PS+ PE- Y+ PGP+ t++ 5+ X- R+ tv- b+++ DI D G e++ h r++ y+ --END GEEK CODE BLOCK-- -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
Re: [Ubuntu-BR] Criar similar ao arquivo .bat no Ubuntu.
[EMAIL PROTECTED]:~$ gcc alg alg: file not recognized: File format not recognized collect2: ld returned 1 exit status arquivos .c o gcc não compila sem extensao... haha. mas acho que isso é só por causa de ele ter a possibilidade de abrir mais de 1 tipo de arquivo. -- ubuntu-br mailing list ubuntu-br@lists.ubuntu.com www.ubuntu-br.org https://lists.ubuntu.com/mailman/listinfo/ubuntu-br