Afficher un message
Vieux 22/08/2006, 19h01   #5
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Need to append 2nd line to the first

2006-08-22, 10:41(-07), cberthu@gmail.com:
[...]
>> awk 'NR%2{s=$0;next}{print s$0}' file
>>
>> Ed.

>
>
> Thanks Ed
>
> Hey it looks so simple and it is actually...... Thanks a lot...


That's a bit overkill compared to

paste -d'\0' - - < file
or
paste -sd'\0\n' file

though and would discard the last line of a file with an odd
number of lines.

--
Stéphane
  Réponse avec citation
 
Page generated in 0,05562 seconds with 9 queries