Article 527D8 Treat Two Column as One

Treat Two Column as One

by
blueray
from LinuxQuestions.org on (#527D8)
Sample Text:

Code:$ cat X
Birth Death Name
02/28/42 07/03/69 Brian Jones
11/27/42 09/18/70 Jimi Hendrix
11/19/43 10/04/70 Janis Joplin
12/08/43 07/03/71 Jim Morrison
11/20/46 10/29/71 Duane AllmanAfter Processing With Perl:

Code:$ perl -lae 'print "$F[2]_$F[3] $F[0]"' X | column -t | sed 's/_/ /g'
Name Birth
Brian Jones 02/28/42
Jimi Hendrix 11/27/42
Janis Joplin 11/19/43
Jim Morrison 12/08/43
Duane Allman 11/20/46This is the exact output I want. But the issue is, I do not want to use Code: column -t | sed 's/_/ /g' at the end.

My intuition is that this can be done only with perl (without the need of sed or column).

Is it possible? How can I do that?latest?d=yIl2AUoC8zA latest?i=WKC2oLyyGPc:z_m_PPenBM8:F7zBnMy latest?i=WKC2oLyyGPc:z_m_PPenBM8:V_sGLiP latest?d=qj6IDK7rITs latest?i=WKC2oLyyGPc:z_m_PPenBM8:gIN9vFwWKC2oLyyGPc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments