linha de comando, eq cat test test test|shuf|head -n 18|grep -v ^$|paste -s -d" : cat test test test"
powershell $r=New-Object Random;1..3^|%{gc test}^|select -f 18^|%{[array]$A+=$_};1..$A.Count^|%{$A[$r.Next(0,$A.Count-1)]}^|?{$_.Length -ne 0}^|%{$S+=$_};$S
shuf correspondência aproximada '' 1..3 ^ |% {gc test} '
head -n 18 (sequências shuffle do powershell no pipe):
$r=New-Object Random; ... %{[array]$A+=$_};1..$A.Count^|%{$A[$r.Next(0,$A.Count-1)]}
select -f 18 correspondência aproximada grep -v ^$
?{$_.Length -ne 0} correspondência aproximada paste -s -d" %{$S+=$_};$S"
test correspondência aproximada test
quando vir a linha de comando:
cat test test test|shuf|head -n 18|grep -v ^$|paste -s -d"1
2
3
5
7
8
"
imaginou o tipo de arquivo - %code% :
apple
orange
cafe
11
22
33
use o arquivo %code% :
$r=New-Object Random;1..3|%{gc test}|select -f 18|%{[array]$A+=$_};1..$A.Count|%{$A[$r.Next(0,$A.Count-1)]}|?{$_.Length -ne 0}|%{$S+=$_};$S
shuffle1.ps1:
powershell $r=New-Object Random;1..3^|%{gc test}^|select -f 18^|%{[array]$A+=$_};1..$A.Count^|%{$A[$r.Next(0,$A.Count-1)]}^|?{$_.Length -ne 0}^|%{$S+=$_};$S
Para gerar texto a partir de modelos, é mais adequado em outro idioma.
Precisa de um especialista em Common Lisp e C. Pode ser um especialista em Haskell.
Se necessário computação simbólica matemática, então é provável que o Maxima.
Mas você sempre pode fazer quaisquer ferramentas que não sejam projetadas para tarefas específicas))).
Será muito bom se você descrever seu problema completamente. Arquitetonicamente.