Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:11:01+00:00 2026-06-18T00:11:01+00:00

Again, I have about 150 files with the following data with no header x1

  • 0

Again, I have about 150 files with the following data with no header

x1 y1 z1

x2 y2 z2

…

zn yn zn

The delimiter happens to be tab key. How could I use sed and batch processing for these 150 files to achieve the following output:

x1

x2

x3

…

xn

y1

y2

y3

…

yn

z1

z2

z3

..

zn

Any ideas would be appreciated.

NOTE: I posted similar question before, not duplicate. Please see this link.

Regards,

ikel

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:11:02+00:00Added an answer on June 18, 2026 at 12:11 am

    I don’t think sed is the best tool for this job. The simplest solution that comes to mind simply involves using cut three times:

    cut -f1 file && cut -f2 file && cut -f3 file
    

    Contents of file:

    x1  y1  z1
    x2  y2  z2
    x3  y3  z3
    xn  yn  zn
    

    Results:

    x1
    x2
    x3
    xn
    y1
    y2
    y3
    yn
    z1
    z2
    z3
    zn
    

    For batch processing your files assuming you only have the files of interest in your present working directory:

    for i in *; do 
        cut -f1 "$i" >> "$i.bak"
        cut -f2 "$i" >> "$i.bak"
        cut -f3 "$i" >> "$i.bak"
    
        mv "$i.bak" "$i"
    done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table with about 150 rows in it. These are the data
Once again a question about the garbage collector in actionscript-3: If I have a
Once again I have a question about Eclipselink/MOXy with external metadata mapping file. I
This applicaiton validates that the user is entering the correct data. I have about
Again I have a question about an ssh issue: On a embedded system (no
I have about 70-150 different structs X with an unsigned integral ID field. They
Will I have to pay again? I have about 9 months left before renewal
I have about 50 p tags and next to these are again 50 divs.
I have about the following query: SELECT * FROM Product ORDER BY (SELECT CASE
Again I have a question regarding this plugin: http://t.wits.sg/2008/06/20/jquery-progress-bar-11/ What I want to achieve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.