Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias output_hellsoul {
- set -l %arquivo_numeros arquivo_numeros.txt
- set -l %arquivo_mensagens arquivo_mensagens.txt
- set -l %arquivo_output arquivo_output.txt
- if (!$lines(%arquivo_numeros)) || (!$lines(%arquivo_mensagens)) {
- echo -a Arquivos de entrada sem linhas!
- return
- }
- .fopen arquivo_numeros $qt(%arquivo_numeros)
- .fopen arquivo_mensagens $qt(%arquivo_mensagens)
- .fopen -o arquivo_output $qt(%arquivo_output)
- set -l %read1
- set -l %read2
- while 1 {
- %read1 = $fread(arquivo_numero)
- if ($feof) break
- :a
- %read2 = $fread(arquivo_mensagens)
- if ($feof) {
- .fseek -l arquivo_mensagens 1
- goto a
- }
- .fwrite -n arquivo_output $instok(%read1,%read2,2,59)
- }
- .fclose arquivo_numeros
- .fclose arquivo_mensagens
- .fclose arquivo_output
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement