Extraction d'une colonne

Fermé
mecool23 - 3 avril 2008 à 11:47
dubcek Messages postés 18589 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 21 mars 2023 - 3 avril 2008 à 12:09
Bonjour,
mon probléme consiste à créer 2 fichiers à partir d'un fichier
exemple: fichier <tmp.txt>

19920505_19991015 1672152
19920505_19970103 1813482
19920505_19971219 1794068

le résultat voulu 2 fichiers:
<t1>

19920505_19991015
19920505_19970103
19920505_19971219

<t2>

1672152
1813482
1794068

merci d'avance

1 réponse

dubcek Messages postés 18589 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 21 mars 2023 5 584
3 avril 2008 à 12:09
hello
awk '{print $1 >" t1" ; print $2 > "t2"}' < tmp.txt
1