[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] inverter campo
From: |
Eriberto |
Subject: |
Re: [shell-script] inverter campo |
Date: |
Sun, 14 Aug 2005 21:57:41 -0300 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Uma idéia:
---------
#!/bin/bash
cat arquivo.txt | cut -f 1 > coluna1.txt
cat arquivo.txt | cut -f 2 > coluna2.txt
paste coluna2.txt coluna1.txt > novo_arquivo.txt
---------
Tanto no cut quanto no paste, quando você não cita um caractere
separador, o TAB é utilizado com default.
[]s
Eriberto - www.eriberto.pro.br
HOGWASH - IPS invsível em camada 2. http://www.eriberto.pro.br/hogwash
Celso Viana escreveu:
já tentei e não consegui escrever um script para inverter as colunas;
- inverter campo, Celso Viana, 2005/08/14
- Re: [shell-script] inverter campo,
Eriberto <=