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

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

Re: [shell-script] sincronizar duas listas correndo paralelamente


From: Jorge Barros de Abreu
Subject: Re: [shell-script] sincronizar duas listas correndo paralelamente
Date: Sat, 3 Aug 2019 08:28:23 -0300
User-agent: Mutt/1.6.1 (2016-04-27)

O trecho LISTA="..." pode virar LISTA=`cat enviarlista.txt | tr '\n' ';'`


On Sat, Aug 03, 2019 at 08:01:46AM -0300, Jorge Barros de Abreu wrote:
> Fiz correcoes no script:
> 
> #!/bin/bash
> oIFS=$IFS
> IFS=';'
> ARQUIVO="relatorio.txt"
> LISTA="./a.out 0.000000 0.000000 0.000000 1.000000 0.570000 0.570000 0.570000 
> -0.577350 -0.577350 -0.577350;
> ./a.out 0.000000 0.000000 0.000000 1.000000 0.570000 0.570000 0.570000 
> 0.577350 0.577350 0.577350;
> ./a.out 0.000000 0.000000 0.000000 1.000000 0.500000 0.500000 0.500000 
> -0.577350 -0.577350 -0.577350;
> ./a.out 0.000000 0.000000 0.000000 1.000000 0.500000 0.500000 0.500000 
> 0.577350 0.577350 0.577350;
> ./a.out 0.000000 0.000000 0.000000 1.000000 0.250000 0.250000 0.250000 
> -0.577350 -0.577350 -0.577350;
> ./a.out 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 -0.750000 
> 0.000000 0.000000 -1.000000"
> j=0
> for i in $LISTA
> do
>     echo "$j.txt" >> $ARQUIVO   #preciso colocar com zeros `a esquerda nao 
> consegui
>     echo "$LISTA" >> $ARQUIVO
>     `echo $i`        #esta linha executa o programa no ambiente shell não 
> funciona
>     if [ -e nomegenerico.txt ]
>       then
>           mv nomegenerico.txt $j.txt
>     fi
>     j=j+1
> done
> IFS=$oIFS
> 
> 
> -- 
> Data Estelar 2458698,957766
> http://sites.google.com/site/ficmatinf
> Desejo-lhe Paz, Vida Longa e Prosperidade.
> São Bem Vindas Mensagens no Formato texto UTF-8 com Acentos.

-- 
Data Estelar 2458698,972882
http://sites.google.com/site/ficmatinf
Desejo-lhe Paz, Vida Longa e Prosperidade.
São Bem Vindas Mensagens no Formato texto UTF-8 com Acentos.


reply via email to

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