[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] pegar linhs em Arquivos e adicioná-las em outro
From: |
Gustavo Chaves |
Subject: |
Re: [shell-script] pegar linhs em Arquivos e adicioná-las em outro |
Date: |
19 May 2005 09:39:00 -0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
>>>>> On Thu, 19 May 2005 11:20:21 -0000, "Leonardo Vieira" <address@hidden>
>>>>> said:
> Galera, tenho o seguinte caso:
> Tenho um arquivo (arq1.txt) e preciso fazer o seguinte:
> * pegar a segunda e terceira linhas, e as 9 últimas linhas dese
> arquivo e adiciná-las no final de um outro arquivo (arq2.txt).
Experimente:
sed -n '2,3p;4q' arq1.txt >arq2.txt
tail -9 arq1.txt >>arq2.txt
Gustavo.