Remplacer un caractère à travers shell
Fermé
chiefNam
Messages postés
5
Date d'inscription
mardi 14 août 2018
Statut
Membre
Dernière intervention
17 août 2018
-
14 août 2018 à 12:26
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 - 17 août 2018 à 13:54
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 - 17 août 2018 à 13:54
A voir également:
- Bash remplacer un caractère par un autre
- Caractère ascii - Guide
- Remplacer un mot par un autre word - Guide
- Remplacer disque dur par ssd - Guide
- Caractere speciaux - Guide
- Caractère spéciaux - Guide
2 réponses
zipe31
Messages postés
36402
Date d'inscription
dimanche 7 novembre 2010
Statut
Contributeur
Dernière intervention
27 janvier 2021
6 407
14 août 2018 à 13:06
14 août 2018 à 13:06
Salut,
Il aurait été plus judicieux de nous faire un copier/coller d'un bout de ton fichier plutôt que de mettre des captures d'écran ;-(
Un truc du genre devrait le faire (sous réserve qu'il n'y ait pas de caractères sournois dans ton fichier) :
Il aurait été plus judicieux de nous faire un copier/coller d'un bout de ton fichier plutôt que de mettre des captures d'écran ;-(
Un truc du genre devrait le faire (sous réserve qu'il n'y ait pas de caractères sournois dans ton fichier) :
$ cat f1
qdqsdqsgd|klqsdq|qkhdqsklhdqskl \
|hsdjkfhsjfh|kfjdfjsdk|||
gjldmfjgldfm|glmdfgk|mjc \
|fjsdkl|klsdf|||
$ sed ':z;N;$!bz;s/\\\n/|/g' f1
qdqsdqsgd|klqsdq|qkhdqsklhdqskl ||hsdjkfhsjfh|kfjdfjsdk|||
gjldmfjgldfm|glmdfgk|mjc ||fjsdkl|klsdf|||
cs_PaTaTe
Messages postés
2126
Date d'inscription
mercredi 21 août 2002
Statut
Contributeur
Dernière intervention
19 février 2021
493
14 août 2018 à 12:42
14 août 2018 à 12:42
Bonjour,
Je suis assez mauvais avec awk mais un truc du genre :
awk 'BEGIN {ORS=" "} {print} END {print "\n"}' SOURCE
SOURCE étant la chaîne à modifier
Je suis assez mauvais avec awk mais un truc du genre :
awk 'BEGIN {ORS=" "} {print} END {print "\n"}' SOURCE
SOURCE étant la chaîne à modifier
chiefNam
Messages postés
5
Date d'inscription
mardi 14 août 2018
Statut
Membre
Dernière intervention
17 août 2018
14 août 2018 à 13:04
14 août 2018 à 13:04
Merci bcp,
j'essai avec
j'essai avec
16 août 2018 à 16:59
Ci-dessous le contenu
hhhth|yuiok,|fee|rtnjjk| |derf|xcvg| |ghjui|tgrfe|g|14/06/2018|huuj|uytr|5896,0|x|hikioujk \
|Z|gtyyhju| | | | | | |896|hjyj|yjyj|| |rtj|rzrtyh| |h|r|e| ||rey|hyh|grry|ryy|hji,0|htrh|th|0| | |thj| |thtj| ||| | | | |
jyjj|yj|rj|rtj| |rtj|rtj| |rtj|ffh|3|14/06/2018|9000|14/06/2018|33000,0|C|olppkh \
|Z|gtyyhju| | | | | | |896|hjyj|yjyj|| |rtj|rzrtyh| |h|r|e| ||rey|hyh|grry|ryy|hji,0|htrh|th|0| | |thj| |thtj| ||| | | | |
hhhth|yuiok,|fee|rtnjjk| |derf|xcvg| |ghjui|tgrfe|g|14/06/2018|huuj|uytr|5896,0|x|hikioujk \
|Z|gtyyhju| | | | | | |896|hjyj|yjyj|| |rtj|rzrtyh| |h|r|e| ||rey|hyh|grry|ryy|hji,0|htrh|th|0| | |thj| |thtj| ||| | | | |
jyjj|yj|rj|rtj| |rtj|rtj| |rtj|ffh|3|14/06/2018|9000|14/06/2018|33000,0|C|olppkh \
|Z|gtyyhju| | | | | | |896|hjyj|yjyj|| |rtj|rzrtyh| |h|r|e| ||rey|hyh|grry|ryy|hji,0|htrh|th|0| | |thj| |thtj| ||| | | | |
hhhth|yuiok,|fee|rtnjjk| |derf|xcvg| |ghjui|tgrfe|g|14/06/2018|huuj|uytr|5896,0|x|hikioujk \
|Z|gtyyhju| | | | | | |896|hjyj|yjyj|| |rtj|rzrtyh| |h|r|e| ||rey|hyh|grry|ryy|hji,0|htrh|th|0| | |thj| |thtj| ||| | | | |
jyjj|yj|rj|rtj| |rtj|rtj| |rtj|ffh|3|14/06/2018|9000|14/06/2018|33000,0|C|olppkh \
|Z|gtyyhju| | | | | | |896|hjyj|yjyj|| |rtj|rzrtyh| |h|r|e| ||rey|hyh|grry|ryy|hji,0|htrh|th|0| | |thj| |thtj| ||| | | | |
je souhaite avoir au rendu ceci:
16 août 2018 à 18:11
Ben la commande donnée ci-dessus ( ) fait exactement ce que tu veux ;-))
17 août 2018 à 10:14
j'ai essayé mais j'ai un Feedback, ci dessous la capture.
17 août 2018 à 10:22
Essaie comme ça :
17 août 2018 à 13:25
le systeme est win 10.
je travaille à distance sur le serveur à travers le protocole de communication genero