codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#!/usr/bin/perl use Getopt::Std; use vars qw($opt_t); &getopts('t:') or die "Erro: Opcao nao existe! Execute o programa seguindo o exemplo: run_contagem_final -t synop\n"; unless( $opt_t ){ print "Entre com o Parametro 't' e o tipo correspondente.\n"; print "Exemplo: run_contagem_final.pl -t synop\n"; exit; } # nomes e diretórios para os arquivos de destino my $arquivo = $opt_t."_totalmes.txt"; my $arquivo2 = $opt_t."_mediames.txt"; my $arquivo3 = $opt_t."_totaldiario.txt"; # efetua a cópia propriamete dita dos arquivos. my $type = "2011_".$opt_t.".txt"; print "$type\n"; system("mv /meu/diretorio/total_mensal_$opt_t.txt >> $arquivo"); system("mv /meu/diretorio/$type >> $arquivo3"); system("mv /meu/diretorio/media_mensal_$opt_t.txt >> $arquivo2");
Private
[
?
]
Run code
Submit