Probleme Pipe CSH

Résolu
visiteurr -  
 visiteurr -
Bonjour,

Je suis en Cshell je ne comprend pas pourquoi ça fait ca :

test% more tttt
1 2 3 4
1 6 7 8
9 9 11 12
13 14 15 16
test% tail +2 tttt | sed '$d' tttt
1 2 3 4
1 6 7 8
9 9 11 12
test% sed '$d' tttt | tail +2 tttt
1 6 7 8
9 9 11 12
13 14 15 16
test% tail +2 tttt > tttt2
test% sed '$d' < tttt2
1 6 7 8
9 9 11 12

les pipes marche bien comme ca non ?
je veu obtenir les 2 dernieres ligne avec un pipe ... quelqu'un sait ? merci =)
A voir également:
  • Probleme Pipe CSH
  • New pipe - Guide
  • Pipe excel - <a href="https://forums.commentcamarche.net/forum/excel-145">Forum Excel</a>
  • Csh foreach - <a href="https://forums.commentcamarche.net/forum/shell-287">Forum Shell</a>
  • Faire un pipe sur mac - <a href="https://forums.commentcamarche.net/forum/autres-distributions-linux-319">Forum Autres distributions Linux</a>
  • Remplacement caractère fichiers CSH - <a href="https://forums.commentcamarche.net/forum/shell-287">Forum Shell</a>

1 réponse

zipe31 Messages postés 34620 Date d'inscription   Statut Contributeur Dernière intervention   6 501
 
Salut,

tail +2 tttt | sed '$d' tttt
Déjà là le nom du fichier est en trop ;-((

La bonne syntaxe c'est :
tail +2 tttt | sed '$d'
1
visiteurr
 
Re merci Zipe31 ... décidement faut que j'arrette pour aujourd'hui lol

surtout que la syntaxe initiale que j'ai fai c'est :
test% tail +2 | sed '$d' tttt
1 2 3 4
1 6 7 8
9 9 11 12

tu vois vraiment nul lol
merci bien
0