You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(19) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <aku...@sh...> - 2004-08-20 03:22:52
|
11'th Annual Tcl/Tk Conference October 11 - 15, 2004 New Orleans, Louisiana, USA Email Contact tc...@tc... We are pleased to announce the 11'th Annual Tcl/Tk conference (Tcl'2004), sponsored by Noumena Corporation, in cooperation with ActiveState and ExpoTech. Come to New Orleans to: * Learn about the power of Tcl/Tk. * Present exciting new work involving Tcl/Tk. * See the latest developments in Tcl/Tk. * Meet Tcl/Tk researchers and users from academia, government and industry. * Plan for future Tcl/Tk related developments. The conference program will include paper presentations, tutorials, Birds of a Feather (BOF) sessions and invited key-note talks. Registration Online registration is ready now. <http://www.tcl.tk/community/tcl2004/reg.html> Tutorials Come learn about Tcl from the experts. This year's Tcl/Tk Conference includes one of the best sets of Tutorials ever offered including tutorials on Jacl, TclHttpd, Starkit, Advanced GUI construction, and the API. <http://www.tcl.tk/community/tcl2004/tut2004.html> Schedule More details will be added to the schedule as they become available. <http://www.tcl.tk/community/tcl2004/schedule.html> Those attending the conference will be interested in the conference info page. <http://www.tcl.tk/community/tcl2004/info.html> To keep in touch with news regarding the conference and Tcl events in general, subscribe to the tcl-announce list. <http://listserv.activestate.com/mailman/mysubs?show=announce> Other Forms of Participation For those who are not presenting a paper at the conference, but would like to present their work in some form, we do provide several other forms of participation. Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather sessions (BOFs) are available on a first-come, first-served basis by sending email to tc...@tc.... Some WIP and BOF time slots will be held open for on-site reservation, so we encourage all attendees with interesting work in progress to consider presenting that work at the conference. Conference Committee Gerald Lester HMS Software General Chair Andreas Kupries ActiveState Corp Clif Flynt Noumena Corp Website Admin Jeffrey Hobbs ActiveState Corp Kevin Kenny GE Global Research Center Ken Jones Avia Training Mac Cody Raytheon Company Kim Richerts Steve Landers Digital Smarties Sheila Miguez Motorola Larry Virden Tcl FAQ Maintainer Contact Information tc...@tc... |
From: Helliandro S. H. <hel...@ie...> - 2002-07-08 22:04:37
|
1) Para mandar o resultado da quinta coluna para um arquivo chamado coluna5.res ps aux |cut --c=3D26-30 > coluna5.res // corta os caracteres das colunas 26 =E0 30 e joga para o arquivo 2) Para mandar o resultado da quinta linha para um arquivo chamado linha5.res ps aux |head -n 5 |tail -n 1 > linha5.res //lista os processos ,com o 'head' as 5 primeiras linhas do arquivo, depois lista com o 'tail' a ultima linha das linhas listadas anteriormente, depois joga para o arquivo com o '>' . 3) Para mandar o resultado da quinta linha, intercess=E3o com a quinta coluna em um arquivo lincol5.res ps aux |cut --c=3D26-30 |head -n 5 |tail -n 1 > lincol.res //lista os processos ,com o 'head' as 5 primeiras linhas do arquivo, depois lista com o 'tail' a ultima linha das linhas listadas anteriormente, corta com o 'cut' os caracteres das colunas 26 =E0 30 ,depois joga para o arquivo com o '>'. Helliandro Souto Henrique!!!! http://www.ieg.com.br |
From: Gilvana <gil...@uo...> - 2002-07-05 23:30:27
|
Desculpem-me o atraso. Resposta do n=BA 01: ps aux |cut -c 27-30 > coluna5.res #|cut -c 26-30 S=E3o selecionados os caracteres de 26 a 30 de todas = as linhas. Resposta do n=BA 02 ps aux |head -n 6 |tail -n 1 > linha5.res #|head -n 5 Mostra da 1=BA linha at=E9 a 6=BA linha #|tail -n 1 Mostra, dentre as linhas j=E1 selecionadas anteriormente = com o comando |head, apenas a 5=BA linha. Resposta do n=BA 3 ps aux |cut -c 26-30 |head -n 6 |tail -n 1 > lincol5.res # Todos os comando juntos ir=E3o formar a intersess=E3o da 5=BA linha= com a 5=BA coluna. |
From: Gilvana <gil...@uo...> - 2002-07-05 23:29:33
|
Desculpem-me o atraso. Resposta do n=BA 01: ps aux |cut -c 27-30 > coluna5.res #|cut -c 26-30 S=E3o selecionados os caracteres de 26 a 30 de todas = as linhas. Resposta do n=BA 02 ps aux |head -n 6 |tail -n 1 > linha5.res #|head -n 5 Mostra da 1=BA linha at=E9 a 6=BA linha #|tail -n 1 Mostra, dentre as linhas j=E1 selecionadas anteriormente = com o comando |head, apenas a 5=BA linha. Resposta do n=BA 3 ps aux |cut -c 26-30 |head -n 6 |tail -n 1 > lincol5.res # Todos os comando juntos ir=E3o formar a intersess=E3o da 5=BA linha= com a 5=BA coluna. |
From: dhuberto <dhu...@te...> - 2002-07-05 21:30:05
|
#!/bin/bash #Enviar Resultado da 5 Coluna do Conteudo do Comando ps aux para o Arquivo Coluna5.res. ps aux |cut -c 26-30 > Coluna5.res # |cut -c Copia as colunas de 26 a 30, # > envia o Conteudo Para o Arquivo Coluna5.res #----------------------------------------------. #Enviar Resultado da 5 Linha do Conteudo do Comando ps aux para o Arquivo Linha5.res. ps aux |head -n 6 |tail -n 3 > Linha5.res # |head -n 6 ler as 6 Primeiras linha do conteudo do comando ps aux contando com o cabecalho, # |tail -n 1 Dispensa As 5 linha Acima Deixando apenas Uma, que Foi Lido pelo |head -n 6 # > e envia o Conteudo para o Arquivo Linha5.res. #-----------------------------------------------. #Enviar o Resultado da Intercess=E3o da 5 Linha com a 5 Coluna para o Arquivo Lincol5.res. ps aux |cut -c 26-30 |head -n 6 |tail -n 1 > Lincol5.res # |cut -c Copia as colunas de 26 a 30, |head -n 6 Ler as 6 Primeiras linha da Coluna # do Conteudo do Comando ps aux # |tail -n 1 Deixa apenas a ultima Linha, Dispensando as 5 Primeiras assim tornando a Intercess=E3o e a # > envia para o Arquivo Lincol5.res. # # Resumo:(cut -c 26-30) Ler as Coluna 26,27,28,29,30 do Comando ps aux, Dispensando o Restante, # (head -n 6) Ler o que Sobrou das Colunas, lendo, as 6 Primeiras Linhas Dispensando # o Restante com esses Comandos Ficaram Apenas as 6 Primeiras Linhas Das Colunas 26a30 # (tail -n 1) Remove as 5 Linhas Acima Deixando Apenas Uma, que por sua Vez e A Ultima # Linha da Coluna 26a30 e Esta Ai A Intercess=E3o!!! #-----------------------------------------------. #-Danilo Huberto-# #----04-07-02----# |
From: davidnsg <dav...@bo...> - 2002-07-04 01:22:53
|
1) Para mandar o resultado da quinta coluna para um arquivo chamado coluna5.res R: ps aux |cut -c 27,28,29,30 >coluna5.res 2) Para mandar o resultado da quinta linha para um arquivo chamado linha5.res R: ps aux |head -n 5 |tail -n 1 >linha5.res 3) Para mandar o resultado da quinta linha, intercess=E3o com a quinta coluna em um arquivo lincol5.res R: ps aux |cut -27,28,29,30 |head -n 5 |tail -n 1 >lincol5.res __________________________________________________________________________ AcessoBOL, s=F3 R$ 9,90! O menor pre=E7o do mercado! Assine j=E1! http://www.bol.com.br/acessobol |
From: Anahuac <an...@li...> - 2002-06-28 17:51:11
|
Olá Pessoal, Pelo que pude perceber não houve dificuldade com o primeiro exercíco. Então agora vamos apertar um pouco. O exercício um foi bem interpretado por todos. O segundo esta em anexo. Dica: dem uma olhada no uso do "pipe", cut, awk, tail e head Boa sorte. |
From: davidnsg <dav...@bo...> - 2002-06-28 03:35:13
|
O -z serve para verificar se h=E1 algum par=E2metro, se houver, Ele imprime, na tela, o primeiro parametro sen=E3o o script imprime o outro. __________________________________________________________________________ AcessoBOL, s=F3 R$ 9,90! O menor pre=E7o do mercado! Assine j=E1! http://www.bol.com.br/acessobol |
From: Gilvana <gil...@uo...> - 2002-06-28 01:10:29
|
Compilac=E3o do Kernel por: Jo=E3o Alexandre Voss de Oliveira=20 1. INTRODU=C7=C3O Compilar o kernel do linux tem sido encarado como um grande trabalho por parte dos usu=E1rios Linux mais novos. Na verdade, se seguirmos algumas regras simples, a tarefa de compilar o kernel pode ser bastante proveitosa, pois, al=E9m de ajustar op=E7=F5es como o tipo de = processador correto para a m=E1quina em uso, adequa=E7=F5es ao hardware espec=EDfico da = m=E1quina=20 quase sempre resultam em um kernel menor e num sistema mais r=E1pido e est=E1vel. Apesar de o kernel do Linux ser uma pe=E7a de software relativamente complicada, afirmam os estudiosos que =E9 um dos projetos de kernel de 32 bits mais simples em uso atualmente. Na verdade, para que um sistema Linux funcione bem, n=E3o =E9 = imprescind=EDvel a recompila=E7=E3o do kernel ap=F3s a primeira instala=E7=E3o. Mas logo = o usu=E1rio ir=E1, por necessidade ou apenas a boa e velha curiosidade, = interessar-se por colocar esta ou aquela "feature" em a=E7=E3o, como, por exemplo, = fazer funcionar aquela nova unidade CDR, uma placa de rede espec=EDfica ou = mesmo adequar a m=E1quina =E0s fun=E7=F5es de proxy transparente. Este breve tutorial tem por base a distribui=E7=E3o Slackware do Linux. Via de regra, por=E9m, pode ser aplicado a qualquer uma. Considera=E7=F5es iniciais feitas, passemos ao trabalho. 2. BAIXANDO A =DALTIMA VERS=C3O DO KERNEL A =FAltima vers=E3o do kernel do Linux pode ser baixada do endere=E7o http://www.kernel.org Existem, tamb=E9m, diversos "mirrors" e reposit=F3rios na web onde os fontes do kernel podem ser obtidos. Atualmente, a =FAltima vers=E3o est=E1vel =E9 a linux-2.4.10.tar.gz 2. DESCOMPACTANDO E INSTALANDO OS FONTES DO KERNEL Ap=F3s o download da vers=E3o atualizada do kernel, =E9 necess=E1rio = descompactar os fontes. Isto =E9 feito no diret=F3rio /usr/src, com o usu=E1rio = logado como "root": a. copie o arquivo linux-2.4.10.tar.gz para /usr/src: [root@locutus]:~# cp linux-2.4.10.tar.gz /usr/src b. em /usr/src, exclua o link simb=F3lico "linux": [root@locutus]:~# rm linux c. descompacte os fontes do kernel copiado em /usr/src - ser=E1 criado = um=20 diret=F3rio chamado "linux": [root@locutus]:~# tar -zxvf linux-2.4.10.tar.gz d. renomeie o diret=F3rio "linux" rec=E9m descompactado: [root@locutus]:~# mv /usr/src/linux /usr/src/linux-2.4.10 e. crie um novo link simb=F3lico "linux", desta vez apontando para o = novo diret=F3rio linux-2.4.10: [root@locutus]:~# ln -s /usr/src/linux-2.4.10 linux Neste ponto voce deve ter, em /usr/src, os seguintes diret=F3rios e um symlink: =20 [root@locutus]:~# pwd /usr/src [root@locutus]:~# ls linux@ linux-2.4.5 linux-2.4.10 rpm sendmail Essa =E9 a listagem em /usr/src em meu sistema. Considere linux-2.4.5 como o diret=F3rio dos fontes do seu kernel atual. O link simb=F3lico deve apontar para o diret=F3rio linux-2.4.10. =C9 = nele que o trabalho a seguir deve ser feito. N=E3o delete o diret=F3rio dos = fontes=20 anteriores ainda, voce pode precisar dele mais tarde.=20 Antes de alterarmos a configura=E7=E3o do novo kernel, vamos salvar em = um arquivo as configura=E7=F5es de seu kernel anterior. Suponhamos que voc=EA j=E1 tenha configurado algumas coisas no kernel, e = que esta n=E3o seja sua primeira compila=E7=E3o. Voc=EA j=E1 tem funcionando = aquela placa de rede ou outro hardware, ou mesmo algumas op=E7=F5es especiais do = netfilter, e quer que o novo kernel as mantenha. Para tanto, vc deve salvar as configura=E7=F5es atuais de seu kernel. 3. SALVANDO SUAS CONFIGURA=C7=D5ES ANTERIORES (SE FOR O CASO) Entre no diret=F3rio dos fontes anteriormente intalados (fontes = originais,=20 no exemplo, linux-2.4.5): [root@locutus]:~# cd /usr/src/linux-2.4.5 [root@locutus]:~# make menuconfig a. Na tela que se apresentar, role a tela para baixo e escolha a = op=E7=E3o=20 "Save Configuration to An Alternative File" e tecle ; b. Escolha um nome para o arquivo a ser salvo, no final do "path" onde deseja salv=E1-lo. Por exemplo, digite "/config" para salvar o arquivo config no = diret=F3rio raiz do sistema. Tecle ; c. Saia sem salvar, retornando ao prompt do console. Com isso, ser=E1 poss=EDvel carregar este arquivo de configura=E7=E3o posteriormente. 4. MODIFICANDO O NOVO KERNEL Continuando, os pr=F3ximos passos DEVEM ser executados em = /usr/src/linux; [root@locutus]:~# cd /usr/src/linux [root@locutus]:~# make menuconfig O comando acima iniciar=E1 a configura=E7=E3o em modo gr=E1fico do = kernel. Opcio nalmente, estando em algum ambiente X (KDE, Windowmaker, Blackbox ...), o comando poder=E1 ser: =20 [root@locutus]:~# make xconfig Se, por algum motivo, voc=EA quiser apagar todas as configura=E7=F5es = deste novo kernel, antes de entrar com o comando acima, digite (em /usr/src/linux): [root@locutus]:~# make mrproper Isto apagar=E1 a configura=E7=E3o anterior do kernel no sistema. Geralmente, este passo n=E3o =E9 necess=E1rio em compila=E7=F5es = normais. Em seguida, novamente: [root@locutus]:~# make menuconfig (ou make xconfig, se for o caso) J=E1 nas telas de configura=E7=E3o do novo kernel, =E9 poss=EDvel = selecionar as op=E7=F5es desejadas referentes aos recursos que se deseja implementar. Este =E9 o momento de carregar as configura=E7=F5es do arquivo = anteriormente salvo. Escolha a op=E7=E3o=20 "Load ..." na tela principal do programa de configura=E7=E3o, e aponte o caminho e = o nome do arquivo salvo. As op=E7=F5es de configura=E7=E3o do kernel = anterior ser=E3o carregadas. Ap=F3s fazer as altera=E7=F5es desejadas, =E9 hora de salvar o kernel e = sair novamente para o console. Aqui come=E7a a compila=E7=E3o de seu novo kernel. 5. COMPILANDO Novamente no prompt, =E9 hora de compilar o novo kernel. Para isso, = digite: [root@locutus]:~# make dep =C9 normal este comando demorar alguns minutos, dependendo da velocidade = da m=E1quina. Depois: [root@locutus]:~# make clean Este comando =E9 mais r=E1pido que o anterior. Quando o prompt for = liberado, digite: [root@locutus]:~# make bzImage Isto construir=E1 a nova imagem do kernel, em = /usr/src/linux/arch/i386/boot, em um arquivo chamado bzImage. Os comandos acima criaram as depend=EAncias necess=E1rias, limparam = arquivos tempor=E1rios e de instala=E7=E3o e criaram a imagem compactada do novo = kernel. Ap=F3s algum tempo (que varia de acordo com a m=E1quina), a imagem =E9 = gerada e gravada no diret=F3rio acima referido. V=E1 agora para o diret=F3rio /lib/modules.=20 O comando ls d=E1 a listagem do conte=FAdo: [root@locutus]:~# cd /lib/modules [root@locutus]:~# ls =20 2.4.5 Como visto, h=E1 um diret=F3rio com o nome do kernel anterior =E0 esta = nova compila=E7=E3o. Caso voc=EA esteja instalando um novo kernel, n=E3o =E9 necess=E1rio = alter=E1-lo, pois a instala=E7=E3o dos m=F3dulos, como veremos a seguir, criar=E1 uma = nova =E1rvore de diret=F3rios aqui (no exemplo, 2.4.10). Entretanto, se voc=EA estiver realizando apenas uma recompila=E7=E3o de = um kernel j=E1 instalado, ser=E1 necess=E1rio renomear este diret=F3rio = existente. [root@locutus]:~# mv 2.4.5 2.4.5-old [root@locutus]:~# ls 2.4.5-old Isto feito, passemos =E0 cria=E7=E3o dos m=F3dulos. 6. CRIANDO E INSTALANDO OS NOVOS M=D3DULOS a. Retorne ao diret=F3rio de compila=E7=E3o: [root@locutus]:~# cd /usr/src/linux b. Digite os comandos: [root@locutus]:~# make modules Para construir os m=F3dulos selecionados na configura=E7=E3o do kernel. Depois: [root@locutus]:~# make modules_install Os comandos acima criar=E3o e instalar=E3o os novos m=F3dulos em = /lib/modules. O trabalho de cria=E7=E3o dos m=F3dulos pode demorar um pouco, = dependendo do tipo de m=E1quina (processador, RAM dispon=EDvel, etc). 7. INSTALANDO O NOVO KERNEL Ap=F3s o prompt ser novamente liberado mova a imagem compactada do kernel, de /usr/src/linux/arch/i386/boot para o diret=F3rio raiz (/): [root@locutus]:~# mv /usr/src/linux/arch/i386/boot/bzImage / V=E1 para o diret=F3rio raiz, e renomeie o novo kernel rec=E9m compilado para um nome facilmente identific=E1vel: [root@locutus]:~# cd / [root@locutus]:~# mv bzImage vmlinuz-2.4.10 O novo kernel, agora, ter=E1 o nome acima, vmlinuz-2.4.10. Observe que ser=E1 necess=E1rio indicar ao LILO, qual a imagem = compactada que dever=E1 ser inicializada no boot da m=E1quina. V=E1 para /etc e = edite o arquivo "lilo.conf": [root@locutus]:~# mcedit /etc/lilo.conf Meu lilo.conf se parece com isto: --- # LILO configuration file # # Start LILO global section boot =3D /dev/hda message =3D /boot/boot_message.txt prompt timeout =3D 20 vga =3D normal image =3D /vmlinuz root =3D /dev/hda1 label =3D Linux read-only # Linux bootable partition config ends --- Veja que apenas uma imagem pode ser inicializada. Para adicionar a nova imagem, na se=E7=E3o: #image =3D /vmlinuz root =3D /dev/hda1 label =3D Linux read-only adicione mais uma entrada: =20 image =3D /vmlinuz-2.4.10 root =3D /dev/hda1 label =3D Teste read-only =20 O arquivo lilo.conf deve ficar assim: --- # LILO configuration file # generated by 'liloconfig' # # Start LILO global section boot =3D /dev/hda message =3D /boot/boot_message.txt prompt timeout =3D 20 vga =3D normal image =3D /vmlinuz root =3D /dev/hda1 label =3D Linux read-only image =3D /vmlinuz-2.4.10 root =3D /dev/hda1 label =3D Teste read-only # Linux bootable partition config ends --- Salve o arquivo lilo.conf. No prompt, digite: [root@locutus]:~# lilo para salvar as altera=E7=F5es. Voc=EA poder=E1 ver: Added Linux * Teste indicando que a imagem vmlinuz-2.4.10 poder=E1 ser inicializada no boot da m=E1quina digitando-se "Teste" no prompt do lilo.=20 Posteriormente voc=EA poder=E1 eliminar a imagem antiga (vmlinuz) em "/" = e=20 deletar o diret=F3rio /lib/modules/2.4.5.=20 Mas espere alguns dias, e observe se n=E3o ocorrem erros em m=F3dulos, e = se todas as funcionalidades est=E3o operantes (ppp, etc). Efetue um reboot na m=E1quina, e a nova inicializa=E7=E3o dever=E1 = apresentar Welcome to linux 2.4.10=20 indicando que tudo correu como devia e o novo kernel est=E1 instalado. 8. SE AS COISAS DEREM ERRADO Observe as mensagens de inicializa=E7=E3o, =E0 procura de alguma = mensagem de erro. =C9 poss=EDvel voltar ao antigo kernel (no caso, 2.4.5) simplesmente=20 desfazendo as altera=E7=F5es.=20 Lembre-se que o label "Linux" no prompt do lilo inicializa a imagem que for necess=E1ria, a nova ou a antiga. 9. CONCLUS=C3O N=E3o deixe de consultar a documenta=E7=E3o referente ao kernel, em = especial o "kernel HOWTO". N=E3o esque=E7a que os passos acima devem ser realizados pelo root. |
From: Gilvana <gil...@uo...> - 2002-06-28 01:08:22
|
#! /bin/bash if [-z $1] then echo "" echo "N=E3o foi encontrado nenhum par=E2metro" echo "" else echo "" echo "Comando base =3D $0" echo "Par=E2metro =3D $1" echo "" fi Explica=E7=E3o do c=F3digo acima: usa-se o -z para verificar se h=E1 algu= m par=E2metro em $1, se houver, o -z retorna 0 e passa-se para a linha de c=F3digo ap=F3= s o "else", sendo impressas duas linhas em branco, e entre elas as linhas de c=F3digo, uma afirmando que o nome do script ser=E1 "Comando base" (par=E2= metro $0), e outra que o par=E2metro do script ser=E1 "Par=E2metro" (par=E2met= ro $1). Se o -z retornar 1 (afirma=E7=E3o negativa), s=E3o impressas na tela duas li= nhas em branco acima e abaixo da frase: "N=E3o foi encontrado nenhum par=E2metro". Um abra=E7o, Gilvana Marques |
From: Anahuac <li...@li...> - 2002-06-27 21:19:56
|
Olá Pessoal, Desculpem pela demora em responder aos e-mails. A verdade é que deu pau no meu HD e eu perdi os e-mail das últimas 2 semanas... seria possivel vocês re-enviarem para a lista as suas respostas? Assim posso corrigir e enviar o segundo exercício. Obrigado, Anahuac |
From: Gilvana <gil...@uo...> - 2002-06-22 01:50:46
|
#! /bin/bash if [-z $1] then echo "" echo "N=E3o foi encontrado nenhum par=E2metro" echo "" else echo "" echo "Comando base =3D $0" echo "Par=E2metro =3D $1" echo "" fi Explica=E7=E3o do c=F3digo acima: usa-se o -z para verificar se h=E1 algu= m par=E2metro em $1, se houver, o -z retorna 0 e passa-se para a linha de c=F3digo ap=F3= s o "else" sendo impressas duas linhas em branco, e entre elas as linhas de c=F3digo, uma afirmando que o nome do script ser=E1 "Comando base" (par=E2= metro $0), e outra que o par=E2metro do script ser=E1 "Par=E2metro" (par=E2met= ro $1). Se o -z retornar 1 (afirma=E7=E3o negativa), s=E3o impressas na tela duas li= nhas em branco acima e abaixo da frase: "N=E3o foi encontrado nenhum par=E2metro". Um abra=E7o, Gilvana Marques |
From: Gilvana <gil...@uo...> - 2002-06-22 01:49:38
|
#! /bin/bash if [-z $1] then echo "" echo "N=E3o foi encontrado nenhum par=E2metro" echo "" else echo "" echo "Comando base =3D $0" echo "Par=E2metro =3D $1" echo "" fi Explica=E7=E3o do c=F3digo acima: usa-se o -z para verificar se h=E1 algu= m par=E2metro em $1, se houver, o -z retorna 0 e passa-se para a linha de c=F3digo ap=F3= s o "else" sendo impressas duas linhas em branco, e entre elas as linhas de c=F3digo, uma afirmando que o nome do script ser=E1 "Comando base" (par=E2= metro $0), e outra que o par=E2metro do script ser=E1 "Par=E2metro" (par=E2met= ro $1). Se o -z retornar 1 (afirma=E7=E3o negativa), s=E3o impressas na tela duas li= nhas em branco acima e abaixo da frase: "N=E3o foi encontrado nenhum par=E2metro". |
From: Helliandro S. H. <hel...@ie...> - 2002-06-20 22:43:27
|
if [ -z $1 ] ; then // se n=E3o tiver parametro fa=E7a... =09echo "" =09echo "N=E3o foi passado nenhum par=E2metro" //escrevi isso =09echo "" else //sen=E3o , se for colocar algum parametro ele escreve o comando e o parametro... =09echo "" =09echo "Comando base =3D $0" =09echo "Par=E2metro =3D $1" =09echo "" fi Helliandro Souto Henrique!!!! http://www.ieg.com.br |
From: dhuberto <dhu...@te...> - 2002-06-20 22:29:11
|
#!/bin/bash #-z retorna 0 se for encontrado parametro, e 1 se nao for encontrado #na linha de comando o nome do script equivale ao parametro 0 #e depois do nome do script que e o parametro $1 equivale ao retorno #e assim se houve-se outro parametro seria $2 if [-z $1]; then #Verifica se depois do nome do Escript a algum parametro. #se Nao houver echo "nao foi passado nenhum parametro!" echo "nao foi passado nenhum parametro!" else #e Se o Valor do Retorno for diferente de 1 ou exatamente 0 porque foi #encontrado parametro depois do nome do Script echo "Comando=3D $0" #Escreve o nome do Script no Retorno $0 echo "Parametro=3D $1" #Escreve o Parametro no retorno $1 fi #Danilo Huberto. |
From: dhuberto <dhu...@te...> - 2002-06-20 22:26:23
|
#!/bin/bash #-z retorna 0 se for encontrado parametro, e 1 se nao for encontrado #na linha de comando o nome do script equivale ao parametro 0 #e depois do nome do script que e o parametro $1 equivale ao retorno #e assim se houve-se outro parametro seria $2 if [-z $1]; then #Verifica se depois do nome do Escript a algum parametro. #se Nao houver echo "nao foi passado nenhum parametro!" echo "nao foi passado nenhum parametro!" else #e Se o Valor do Retorno for diferente de 1 ou exatamente 0 porque foi #encontrado parametro depois do nome do Script echo "Comando=3D $0" #Escreve o nome do Script no Retorno $0 echo "Parametro=3D $1" #Escreve o Parametro no retorno $1 fi #Danilo Huberto. |
From: <ema...@uo...> - 2002-06-20 22:12:46
|
# Ol=E1 pessoal! # Acho que =E9 isso ai... #! /bin/bash #se [ o tamanho da string passada como par=E2metro em $1 for 0] ; ent=E3o= ... if [ -z $1 ] ; then #imprime na tela... echo -e "\nN=E3o foi passado nenhum par=E2metro\n"; #a op=E7=E3o -e, habilita o interpretador... #o \n insere uma nova linha, igual ao echo "" #sen=E3o... isto =E9, o tamanho da string em $1 =E9 > 0... else #$0 exibe o comando que chamou o script #$1 exibe o primeiro par=E2metro echo -e "\nComando base =3D $0\nPar=E2metro =3D $1\n"; fi # Emanoel Evaristo --- Use o melhor sistema de busca da Internet Radar UOL - http://radaruol.uol.com.br |
From: Anahuac <an...@li...> - 2002-06-18 23:47:25
|
Olá Pessoal, Tentando melhorar o entendimento dos scripts, que tal se fossem comentadas todas as linhas dele? Uma a uma? Assim cada um dos detalhes poderia ser comentado e discutido, caso alguém tenha dpúvidas no futuro. Mais uma coisa: se alguém conhecer uma forma alternativa de fazer a mesma coisa, colabore, exponha para os demais. valeu? Abraço, Anahuac |
From: Anahuac <li...@li...> - 2002-06-18 16:36:59
|
Data limite para devolução do 1º Exercício: 21/06/2002 Saudações, Anahuac |
From: Anahuac <li...@li...> - 2002-06-18 15:06:25
|
Zigotto wrote: > 1) Como posso identificar se não foram passados parâmetros ? Use a variavel # (ou seja, $#), tipo: if [ $# = 0 ] then echo "no parameters" fi > 2) Como posso saber a quantidade de parâmetros digitados em linha de > comando ? Again, use a variabel #. |
From: <li...@li...> - 2002-06-18 15:00:00
|
Olá Pessoal, O Primeiro exercício esta em anexo. Qualquer dúvida é começar a perguntar na lista. Mais uma vêz insisto em dizer que o e-mail da lista é les...@li.... O endereço li...@li... é meu e-mail pessoal e vocês não devem enviar mensagens para ele. |
From: Anahuac <li...@li...> - 2002-06-16 15:57:48
|
Pessoal, Só para avisar... o primeiro exercício estará sendo enviado na terça-feira dia 18 Anahuac |
From: <li...@li...> - 2002-06-14 17:32:57
|
Pessoal, eu sei que é besteira, mas que tal batisar esta iniciativa com um acronimo? Apesar de eu fazer parte da MICUA - Movimento Internacional Contra o Uso de Acronimos, acho legal a ideia de colocar um nome no grupo... Sugestões? Abraço, Anahuac |
From: <li...@li...> - 2002-06-14 14:34:54
|
Olá Pessoal, Desde meu último e-mail mais dois novos amigos ingressaram no Grupo: Rodolfo Pilas e Lucifer. Sejam bem-vindos. Por favor olhem o histórico da lista para ver a mensagem que postei falando sobre as regras que propus para o funcionamento do grupo. Ai pesoal cadê as criticas? nenhuma sugestão? Abraços, Anahuac |
From: <li...@li...> - 2002-06-12 23:50:28
|
Antes de mais nada obrigado a todos. Esta foi uma idéia que se me ocorreu durante a minha última aula no CTI/DS e achei que algumas pessoas teriam interesse em participar. Não foi a toa. Todos os que eu tinha em mente que fizessem parte dela aceitaram o convite. Importante lembrar que uma boa idéia só pode ser levada a cabo se muitos estiverem de acordo com ela e é isso o que espero que aconteça aqui. Estou repetindo a mensagem que mandei anteriormente para oficializar o inicio desta lista e seus objetivos. Qualquer dúvida, critica ou nova idéia deverá ser enviada para a lista, assim todos teremos acesso. Não há nada definido para este trabalho, assim colaborem, exponham suas idéias e vamos estabelecer juntos as "regras" de trabalho. OK? Saudações, Anahuac Texto original #################### Olá Pessoal, Este e-mail é para tentar esclarecer algumas dúvidas pontuais. 1) Sistema de trabalho: Eu "desafio" o grupo a descrever o que uma determinada função ou script faz ou o contrário, solicito que vocês desenvolvam um "mini programa" que faça uma determinada atividade. Obviamente que o trabalho de estudo para a realização dos trabalhos fica por conta de cada um. Todo mundo fica responsável por corrigir os trabalhos de todo mundo, de ajudar a dirimir dúvidas e de questionar as "avaliações" dos demais. O fundamental que pensemos em grupo. Assim todo mundo aprende sobre os erros e acertos de todo mundo. 2) Participantes Esta lista não é pública. Assim não esta disponível para quem quiser. Como diz o ditado: tem que ter QI (Quem Indique). Novos membros serão admitidos sempre que convidados por qualquer outro membro do grupo. 3) Regras Estive pensando em definir algumas regras de funcionamento para estes trabalhos se não é bem possível que percamos o controle ou que o grupo perca o interesse. Lembrem-se que ninguém esta "obrigado" a fazer parte desta idéia. É por puro, repito, puro interesse próprio que faremos este trabalho. a) Os "exercícios" disponibilizados deverão ser devolvidos à lista no prazo máximo de 4 dias corridos, contados a partir do dia do seu envio. b) O participante que se abster de responder ao exercício enviado, duas vezes consecutivas, será sumariamente removido da lista. c) Anahuac não é uma tábua de salvação ou o ser responsável por ter todas as respostas para os seus questionamentos. Esta entidade chama-se GOOGLE e o melhor é que ele tem site na web -> http://www.google.com d) Todos os participantes tem direito a voz e voto. Assim o grupo pode reclamar, participar e alterar o rumo dos trabalhos sempre que houver maioria. e) Fica terminantemente proibido copiar e colar respostas prontas que forem encontradas na Internet. 5) A lista esta sendo criada. Acredito que amanhã estarei disponibilizando o e-mail para o qual todos deverão enviar suas mensagens. 6) O primeiro trabalho será enviado para a Lista na terça-feira dia 18/06. Isso porque acredito que poderemos contar mais dois ou três participantes. 7) Porfavor, o silêncio é o nosso pior inimigo... critiquem as idéias aqui expostas ############################ |