shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Redirecionamentos específicos


From: Marcus Vinicius
Subject: Re: [shell-script] Redirecionamentos específicos
Date: Tue, 23 Aug 2005 16:02:31 -0300 (ART)

Valeu Amigo,
 
Obrigado pela explicação.
 
Abraços.


MrBiTs <address@hidden> escreveu:
/*
Quem desejar direcionar a saida do time para algum arquivo pode utilizar :
/usr/bin/time -po "/tmp/saida.txt" ls
Detalhe é necessário o caminho do executavel (pelo menos no bash que eu testei).
*/
Você tem que informar o caminho completo do arquivo pois Bash define uma função 
interna chamada time, que faz exatamente a mesma coisa que a ferramenta 
/usr/bin/time ( constante de um pacote chamado time ). Entretanto, a função 
time não possui o parametro -o, e temos o erro de Comando Não Encontrado.
Vejamos, da função help do bash:
# help
GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
These shell commands are defined internally.  Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.
........
time [-p] PIPELINE                 times
........
E do 
# help time
time: time [-p] PIPELINE
    Execute PIPELINE and print a summary of the real time, user CPU time,
    and system CPU time spent executing PIPELINE when it terminates.
    The return status is the return status of PIPELINE.  The `-p' option
    prints the timing summary in a slightly different format.  This uses
    the value of the TIMEFORMAT variable as the output format.
E depois, da ferramenta /usr/bin/time:
# /usr/bin/time --help
Usage: /usr/bin/time [-apvV] [-f format] [-o file] [--append] [--verbose]
       [--portability] [--format=format] [--output=file] [--version]
       [--help] command [arg...]
No seu segundo formato de comando $(time ls) >&, você não está utilizando a 
ferramenta time, mas sim a função interna do bash time.


[As partes desta mensagem que não continham texto foram removidas]



---------------------------------------------------------------------
Esta lista não admite a abordagem de outras liguagens de programação, como 
perl, C etc. Quem insistir em não seguir esta regra será moderado sem prévio 
aviso.
---------------------------------------------------------------------
Sair da lista: address@hidden
---------------------------------------------------------------------
Esta lista é moderada de acordo com o previsto em 
http://www.listas-discussao.cjb.net
---------------------------------------------------------------------



Yahoo! Grupos, um serviço oferecido por:var target="_blank";var URL = new 
Array();URL[1] = 
"http://br.rd.yahoo.com/SIG=12fqsto5l/M=365837.7000707.7924794.2369893/D=brclubs/S=2137111254:HM/Y=BR/EXP=1124799290/A=2932553/R=0/id=flashurl/SIG=10tift5qr/*http://br.movies.yahoo.com/";var
 link="javascript:openWindow(1)";var flashfile = 
'http://br.i1.yimg.com/br.yimg.com/i/br/ads5/cinema_n_suspense.swf?clickTAG='+link+'';var
 altURL = 
"http://br.rd.yahoo.com/SIG=12fqsto5l/M=365837.7000707.7924794.2369893/D=brclubs/S=2137111254:HM/Y=BR/EXP=1124799290/A=2932553/R=1/id=altimgurl/SIG=10tift5qr/*http://br.movies.yahoo.com/";var
 altimg = 
"http://br.i1.yimg.com/br.yimg.com/i/br/ads5/cinema_n_suspense.gif";var width = 
468;var height=60;

---------------------------------
Links do Yahoo! Grupos

   Para visitar o site do seu grupo na web, acesse:
http://br.groups.yahoo.com/group/shell-script/
  
   Para sair deste grupo, envie um e-mail para:
address@hidden
  
   O uso que você faz do Yahoo! Grupos está sujeito aos Termos do Serviço do 
Yahoo!. 


__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]