guilhermeof
(usa Outra)
Enviado em 18/12/2015 - 11:50h
Olá pessoal,
Estou com uma dificuldade em copiar o conteúdo de vários arquivos pra somente um.
Tenho vários arquivos .txt e preciso unir o conteúdo de todos em um só.
Executei o comando:
cat /caminho_do_arquivo/*.txt > novoarquivo.txt
Porém a primeira linha do segundo arquivo tem ficado junto com a ultima linha inserida no 'novoarquivo', conforme exemplo abaixo:
1|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|yadfuagbf|5532.23|15:30:00
2|bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|inaidbfsuag3
3|aaaaaaaaaaa|bbbbbbbbb
4|ccccccccccccccccc|dddd
2|ggggggggg|hh
3|iiiiii|jjj|aaa|
1|kkkkkkk|llllll1|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|yadfuagbf|5532.23|15:30:00
2|mmmmmmmmm|inaidbfsuag3
3|pppppppp|bbbbbbbbb
4|jjjjjjj|dddd
2|uuuuuuuuuuuuuuu|hh
3|ttttttt|jjj|aaa|
1|rrrrrrrr|llllll
Repararem que na linha 7, após o 1|kkkkkkk|llllll ele deveria inserir o 1|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|yadfuagbf|5532.23|15:30:00 abaixo, ficando assim?
1|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|yadfuagbf|5532.23|15:30:00
2|bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|inaidbfsuag3
3|aaaaaaaaaaa|bbbbbbbbb
4|ccccccccccccccccc|dddd
2|ggggggggg|hh
3|iiiiii|jjj|aaa|
1|kkkkkkk|llllll
1|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|yadfuagbf|5532.23|15:30:00
2|mmmmmmmmm|inaidbfsuag3
3|pppppppp|bbbbbbbbb
4|jjjjjjj|dddd
2|uuuuuuuuuuuuuuu|hh
3|ttttttt|jjj|aaa|
1|rrrrrrrr|llllll
Alguém sabe como resolver?? Talvez tenha que utilizar algum parâmetro, mas já tentei vários e não consegui ajustar...