Précédent   Forum des professionnels en informatique > Systèmes > Linux > Applications > Shell
Shell Vos questions sur l'utilisation des commandes shell
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 23/11/2011, 04h10   #1
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Par défaut Ajouter des champs d'un fichier dans un autre fichier lorsqu'ils débutent par une même ligne

Bonjour/Bonsoir

Le titre n'est pas très clair alors je vous explique ce que j'aimerais arriver à faire.

J'ai deux fichiers qui se présentent ainsi :

fichier1 :
Code :
1
2
3
4
4store
7kaa
7kaa-data
...
fichier2 :
Code :
1
2
3
4
5
6
7
2ping (1.1-1) [universe] Ping utility to determine directional packet loss
3270-common (3.3.10ga4-2build1) [universe] Common files for IBM 3270 emulators and pr3287
3depict (0.0.6-1) [universe] visualisation and analysis for single valued point data
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
...
J'aimerais obtenir le fichier suivant :
Code :
1
2
3
4
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
...
Malheureusement je ne sais pas du tout comment faire.

Si quelqu'un avait une piste voire une solution à mon problème, je lui serais reconnaissant.

edit : j'ai essayé avec join mais le résultat n'est pas satisfaisant.
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 23/11/2011, 05h05   #2
Expert Confirmé Sénior
 
Avatar de N_BaH
 
Inscription : février 2008
Messages : 2 071
Détails du profil
Informations forums :
Inscription : février 2008
Messages : 2 071
Points : 4 154
Points : 4 154
Bonjour,

Citation:
avec join […] le résultat n'est pas satisfaisant.
pourquoi ?
N_BaH est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 23/11/2011, 07h35   #3
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Salut,

Et avec "fgrep" ?

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ cat fich1
4store
7kaa
7kaa-data
 
$ cat fich2
2ping (1.1-1) [universe] Ping utility to determine directional packet loss
3270-common (3.3.10ga4-2build1) [universe] Common files for IBM 3270 emulators and pr3287
3depict (0.0.6-1) [universe] visualisation and analysis for single valued point data
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
 
$ fgrep -f fich1 fich2
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
 
$
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 10
Vieux 23/11/2011, 10h47   #4
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Citation:
Envoyé par N_BaH Voir le message
Bonjour,

pourquoi ?
Bonjour

Parce qu'il y a des lignes qui passent "à la trappe"

Je m'explique :

wc -l fichier1
wc -l fichier2
join fichier1 fichier2 | wc -l
Citation:
Envoyé par zipe31 Voir le message
Salut,

Et avec "fgrep" ?

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ cat fich1
4store
7kaa
7kaa-data
 
$ cat fich2
2ping (1.1-1) [universe] Ping utility to determine directional packet loss
3270-common (3.3.10ga4-2build1) [universe] Common files for IBM 3270 emulators and pr3287
3depict (0.0.6-1) [universe] visualisation and analysis for single valued point data
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
 
$ fgrep -f fich1 fich2
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
 
$
Ça ne marche pas non plus... Chez moi j'ai le résultat suivant :
Code :
1
2
3
4
5
6
7
8
9
10
2ping (1.1-1) [universe] Ping utility to determine directional packet loss
3270-common (3.3.10ga4-2build1) [universe] Common files for IBM 3270 emulators a
nd pr3287
3depict (0.0.6-1) [universe] visualisation and analysis for single valued point 
data
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- data
base daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strateg
y game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
Ma version de bash :
Code :
1
2
$bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h00   #5
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Euh... on peut avoir la sortie (ou un bout tout au moins) de cat -A fich1 et cat -A fich2 s'il te plaît, merci.
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h08   #6
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
J'ai mis les fichiers en questions sur un serveur FTP :

http://demonipuch.free.fr/fichier1
http://demonipuch.free.fr/fichier2

Voici les 20 premières lignes de chaque fichiers :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$cat -A fichier1 | head -n 20
4store$
7kaa$
7kaa-data$
7kaa-dbg$
aac-tactics$
abacas$
abgate$
abrowser-zarafa-drag-n-drop$
ac100-tarball-installer$
acoustid-fingerprinter$
activemq$
aephea$
afterstep-data$
afterstep-dbg$
agda$
aglfn$
aha$
aj-snapshot$
akonadi-backend-mysql$
akonadi-backend-odbc$
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ cat -A fichier2 | head -n 20
2ping (1.1-1) [universe] Ping utility to determine directional packet loss$
3270-common (3.3.10ga4-2build1) [universe] Common files for IBM 3270 emulators and pr3287$
3depict (0.0.6-1) [universe] visualisation and analysis for single valued point data$
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon$
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game$
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data$
7kaa-dbg (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries - debug$
a2jmidid (7-3) [universe] Daemon for exposing legacy ALSA MIDI in JACK MIDI systems$
a56 (1.3-6) [universe] Motorola DSP56001 assembler$
aac-tactics virtual package provided by libaac-tactics-coq$
aajm (0.4-5ubuntu1) [universe] ASCII art version of jugglemaster$
abacas (1.3.1-1) [universe] Algorithm Based Automatic Contiguation of Assembled Sequences$
abcm2ps (5.9.22-1) [universe] Translates ABC music description files to PostScript$
abe (1.1-4) [universe] Side-scrolling game named "Abe's Amazing Adventure"$
abe-data (1.1-4) [universe] Side-scrolling game named "Abe's Amazing Adventure"$
abgate (1.1.3-1) [universe] LV2 noise gate plugin$
abinit (5.3.4.dfsg-3build2) [universe] A package for electronic structure calculations$
abinit-doc (5.3.4.dfsg-3build2) [universe] A package for electronic structure calculations$
abiword (2.8.6-0.3ubuntu2) [universe] efficient, featureful word processor with collaboration$
abiword-common (2.8.6-0.3ubuntu2) [universe] efficient, featureful word processor with collaboration -- common files$
Si vous avez besoin de plus de renseignements, n'hésitez pas.

Merci
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h19   #7
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Je ne comprends pas

En prenant exemple sur les deux bouts de fichiers fournis, j'obtiens bien le bon résultat :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$ bash --version
GNU bash, version 4.1.5(2)-release (x86_64-mandriva-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
$ grep -V
GNU grep 2.6.3
 
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
 
$ grep -F -f fichier1 fichier2
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
7kaa-dbg (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries - debug
aac-tactics virtual package provided by libaac-tactics-coq
abacas (1.3.1-1) [universe] Algorithm Based Automatic Contiguation of Assembled Sequences
abgate (1.1.3-1) [universe] LV2 noise gate plugin
 
$
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h22   #8
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Citation:
Envoyé par zipe31 Voir le message
Je ne comprends pas

En prenant exemple sur les deux bouts de fichiers fournis, j'obtiens bien le bon résultat :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$ bash --version
GNU bash, version 4.1.5(2)-release (x86_64-mandriva-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
$ grep -V
GNU grep 2.6.3
 
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
 
$ grep -F -f fichier1 fichier2
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
7kaa-dbg (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries - debug
aac-tactics virtual package provided by libaac-tactics-coq
abacas (1.3.1-1) [universe] Algorithm Based Automatic Contiguation of Assembled Sequences
abgate (1.1.3-1) [universe] LV2 noise gate plugin
 
$
J'ai une version de grep différente, ca pourrait venir de la?

Code :
1
2
$ grep -V
GNU grep 2.5.4
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h27   #9
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Citation:
Envoyé par dmnpch Voir le message
J'ai une version de grep différente, ca pourrait venir de la?

Code :
1
2
$ grep -V
GNU grep 2.5.4
Je doute, fgrep (ou grep -F) étant implémenté depuis un moment dans GNU grep

Que dit ta page de man concernant "fgrep" ou l'option "-F"?

As-tu essayé sur 2 bouts de fichier comme ci-dessus ?
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h34   #10
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
extrait du man grep :

Code :
1
2
 -F, --fixed-strings
              Interpréter le MOTIF comme une liste de chaînes de caractères, séparées par des sauts de ligne. Chacune d'entre elles doit être recherchée. (-F est une spécification POSIX.)
Je viens de me rendre compte de quelque chose de bizarre. Voici une capture d'ecran pour faire court :


Le problème viendrait du fait que grep match les motifs "rs" "ri" entre autre...

edit : après vérification mon fichier1 contient les lignes rs et ri. Le problème viendrait de la.
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h40   #11
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Le problème apparemment c'est que c'est fgrep -f ou grep -F -f et non pas grep -f

Citation:
edit : après versification mon fichier1 contient les lignes rs et ri. Le problème viendrait de la.
Euh... c'est à dire ???
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h44   #12
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Citation:
Envoyé par zipe31 Voir le message
Le problème apparemment c'est que c'est fgrep -f ou grep -F -f et non pas grep -f
Le problème reste entier peu importe la commande utilisée

Citation:
Envoyé par zipe31 Voir le message
Euh... c'est à dire ???
Dans le fichier1, j'ai ça :
Code :
1
2
3
4
5
6
ri
robocut
rocs-dbg
rosegarden-dbg
routino
rs
Du coup, grep/fgrep match les occurrences de "ri" et "rs" sur chaque ligne traitées.
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 11h53   #13
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Citation:
Envoyé par dmnpch Voir le message
Dans le fichier1, j'ai ça :
Code :
1
2
3
4
5
6
ri
robocut
rocs-dbg
rosegarden-dbg
routino
rs
Du coup, grep/fgrep match les occurrences de "ri" et "rs" sur chaque ligne traitées.
Effectivement le problème semble venir de là

Je viens de faire des tests avec une boucle et avec la commande "join" qui m'ont l'air plus probant, à tester :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ while read line; do sed -n "/^${line} /p" fichier2; done <fichier1
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
7kaa-dbg (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries - debug
aac-tactics virtual package provided by libaac-tactics-coq
abacas (1.3.1-1) [universe] Algorithm Based Automatic Contiguation of Assembled Sequences
abgate (1.1.3-1) [universe] LV2 noise gate plugin
 
$ join -1 1 -2 1 fichier1 fichier2
4store (1.1.3-1ubuntu2) [universe] RDF database storage and query engine -- database daemon
7kaa (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries: real-time strategy game
7kaa-data (2.13-1) [universe] Seven Kingdoms Ancient Adversaries - game data
7kaa-dbg (2.14.3-1) [universe] Seven Kingdoms Ancient Adversaries - debug
aac-tactics virtual package provided by libaac-tactics-coq
abacas (1.3.1-1) [universe] Algorithm Based Automatic Contiguation of Assembled Sequences
abgate (1.1.3-1) [universe] LV2 noise gate plugin
 
$
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 14h17   #14
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Avec les paramètres -1 1 -2 1, c'est tout de suite un peu mieux (ça m'apprendra à mieux lire le man ). Mais ce n'est pas encore ça...Mais on s'approche de ce que je veux faire...

Pour être complet, en fait je souhaite obtenir la liste des paquets ajoutés à Ubuntu 11.10

J'ai écrit ceci :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
 
NATTY="http://packages.ubuntu.com/fr/natty/allpackages?format=txt.gz"
ONEIRIC="http://packages.ubuntu.com/fr/oneiric/allpackages?format=txt.gz"
DIR="$HOME/Oneiric"
 
if [[ ! -d $DIR ]]; then
mkdir -p $DIR
fi
 
# Télécharger la liste des paquets
echo -e "\nTéléchargement de la liste des paquets :"
echo "+ Natty"
wget -q $NATTY -O $DIR/natty.list.gz
echo "+ Oneiric"
wget -q $ONEIRIC -O $DIR/oneiric.list.gz
 
# Décompresser les fichiers téléchargés
gzip -d $DIR/natty.list.gz
gzip -d $DIR/oneiric.list.gz
 
# Créer un fichier avec le nom des paquets et sa description complète pour chaque distrib
tail -n+7 $DIR/natty.list > $DIR/natty_desc
tail -n+7 $DIR/oneiric.list > $DIR/oneiric_desc
 
# Créer un fichier avec seulement le nom des paquets pour chaque distrib
tail -n+7 $DIR/natty.list | cut -d' ' -f1 > $DIR/natty
tail -n+7 $DIR/oneiric.list | cut -d' ' -f1 > $DIR/oneiric
 
# Création de la liste des paquets ajoutés avec leur description
diff $DIR/natty $DIR/oneiric | grep ">" | sed -e 's/^> //g' | sort -d > $DIR/fichier1
diff $DIR/natty_desc $DIR/oneiric_desc | grep ">" | sed -e 's/^> //g' | sort -d > $DIR/fichier2
join -1 1 -2 1 $DIR/fichier1 $DIR/fichier2 > $DIR/liste
exit 0

Lorsque je lance le script, j'ai une erreur sur le join :

Code :
1
2
3
4
5
6
$ bash script.sh 
 
Téléchargement de la liste des paquets :
+ Natty
+ Oneiric
join: fichier 2 n'est pas dans l'ordre attendu
Et les fichiers fichier1 et liste ne contiennent pas le même nombre de ligne.

Code :
1
2
$ wc -l $HOME/Oneiric/fichier1
7325 /home/demonipuch/Oneiric/fichier1
Code :
1
2
$ wc -l $HOME/Oneiric/liste
7118 /home/demonipuch/Oneiric/liste
Pourquoi les deux fichiers n'ont pas le même nombre de ligne? D'où provient mon erreur? Que puis-je faire pour y remédier?

Par ailleurs si vous avez des critiques à émettre sur le script, je vous écoutes.

Merci
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 17h08   #15
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Je pense savoir pourquoi j'ai cette erreur sur la commande join.

En examinant d'un peu plus près le fichier1 j'ai trouvé par exemple ceci :
Code :
1
2
3
4
5
comixcursors
comixcursors-lefthanded
comixcursors-lefthanded-opaque
comixcursors-righthanded
comixcursors-righthanded-opaque
Alors que dans le fichier2 j'ai ceci :
Code :
1
2
3
4
5
6
comixcursors (0.7.2-1) [universe] transitional dummy package
comixcursors-lefthanded (0.7.2-1) [universe] X11 mouse pointer themes with a comic art feeling (LH, translucent)
comixcursors-lefthanded-opaque (0.7.2-1) [universe] X11 mouse pointer themes with a comic art feeling (LH, opaque)
comixcursors-righthanded (0.7.2-1) [universe] X11 mouse pointer themes with a comic art feeling (RH, translucent)
comixcursors-righthanded-opaque (0.7.2-1) [universe] X11 mouse pointer themes with a comic art feeling (RH, opaque)
comixcursors virtual package provided by comixcursors-righthanded
On voit que dans le fichier2, que la chaine comixcursors apparait deux fois.

Ce qui fout le bordel quand on passe ces fichiers dans join.
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 17h40   #16
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Citation:
Envoyé par dmnpch Voir le message
Je pense savoir pourquoi j'ai cette erreur sur la commande join.

On voit que dans le fichier2, que la chaine comixcursors apparait deux fois.

Ce qui fout le bordel quand on passe ces fichiers dans join.
Apparemment

Sans compter les doublons issus de la commande "diff" et non zappés par la commande "sort" pour cause de différences sur les versions

Code :
1
2
3
4
5
3270-common (3.3.10ga4-2build1) [universe] Common files for IBM 3270 emulators and pr3287
3270-common (3.3.10ga4-2) [universe] Common files for IBM 3270 emulators and pr3287
3dchess (0.8.1-17) [universe] Play chess across 3 boards!
3depict (0.0.2-1) [universe] visualisation and analysis for single valued point data
3depict (0.0.6-1) [universe] visualisation and analysis for single valued point data
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 17h49   #17
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Citation:
Envoyé par zipe31 Voir le message
Sans compter les doublons issus de la commande "diff" et non zappés par la commande "sort" pour cause de différences sur les versions

Code :
1
2
3
4
5
3270-common (3.3.10ga4-2build1) [universe] Common files for IBM 3270 emulators and pr3287
3270-common (3.3.10ga4-2) [universe] Common files for IBM 3270 emulators and pr3287
3dchess (0.8.1-17) [universe] Play chess across 3 boards!
3depict (0.0.2-1) [universe] visualisation and analysis for single valued point data
3depict (0.0.6-1) [universe] visualisation and analysis for single valued point data
Tiens étrange, je n'ai pas de doublons chez moi
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 17h55   #18
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Citation:
Envoyé par dmnpch Voir le message
Tiens étrange, je n'ai pas de doublons chez moi
Oups, au temps pour moi, mes doublons sont issus d'un cat oneiric_desc natty_desc | sort -u
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 17h59   #19
Invité de passage
 
Inscription : novembre 2011
Messages : 12
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 12
Points : 2
Points : 2
Du coup vous auriez une piste vers laquelle je pourrais m'orienter? (je ne demande pas une commande toute prête, quoique , mais au moins une piste...). Je tourne en rond là...

Merci
dmnpch est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2011, 18h06   #20
Expert Confirmé
 
Inscription : janvier 2011
Messages : 970
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations forums :
Inscription : janvier 2011
Messages : 970
Points : 2 871
Points : 2 871
Tiens je viens de voir ça sur ton diff :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff oneiric_desc natty_desc | grep ">" | sed -e 's/^> //g' | sort | egrep '^<'
< c2hs (0.16.3-1) [universe] C->Haskell Interface Generator
< c2hs-doc (0.16.3-1) [universe] C->Haskell Interface Generator -- Documentation package
< courier-faxmail (0.66.1-1ubuntu3) [universe] Courier mail server - Fax<->mail gateway
< diff-doc (2.8.1-14) dummy transition package for diff-doc -> diffutils-doc
< ec2-init (0.6.1-0ubuntu22) [universe] package renamed -> cloud-init
< geda-xgsch2pcb (0.1.3-2) [universe] GPL EDA -- Electronics design software -- gschem -> PCB workflow GUI
< gif2png (2.5.4-2) [universe] GIF -> PNG conversions
< libdbix-class-perl (0.08192-1) [universe] extensible and flexible object <-> relational mapper
< libmarc-charset-perl (1.32-1) [universe] Perl module for bidirectional MARC-8 <-> Unicode conversion
< libsocket-linux-perl (0.01-1) [universe] module for using socket constants defined in Linux <netinet/tcp.h>
< libtaint-util-perl (0.08-1build1) [universe] Test for and flip the taint flag without regex matches or C<eval>
< rancid-core (2.3.6-1) [universe] transitional dummy package (rancid-core -> rancid)
< rancid-util (2.3.6-1) [universe] transitional dummy package (rancid-util -> rancid)
< rmail (8.14.4-2ubuntu2) [universe] MTA->UUCP remote mail handler
< ruby-romkan (0.4-7) [universe] Romaji <-> Kana conversion library for Ruby
< scheme2c (2011.07.26-2ubuntu2) [universe] Joel Bartlett's fabled Scheme->C system
< scheme2c-doc (2011.07.26-2ubuntu2) [universe] Documentation for the Scheme->C system
Peut être devrais-tu remplacer le grep ">" par egrep "^>"
__________________
$ man woman
Il n'y a pas de page de manuel pour woman.
zipe31 est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 14h29.


 
 
 
 
Partenaires

Hébergement Web