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 8607375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:20:32+00:00 2026-06-12T03:20:32+00:00

I have files (~1k) that look (basically) like this: NAME1.txt NAME ATTR VALUE NAME1

  • 0

I have files (~1k) that look (basically) like this:

NAME1.txt
NAME    ATTR    VALUE
NAME1   x       1      
NAME1   y       2
...

NAME2.txt
NAME    ATTR    VALUE
NAME2   x       19
NAME2   y       23
...

Where the ATTR collumn is same in everyfile and the name column is just some version of the filename. I would like to combine them together into 1 file that looks like:

All_data.txt
ATTR    NAME1_VALUE    NAME2_VALUE    NAME3_VALUE ...
X       1              19             ...
y       2              23             ...
...

Is there simple way to do this with just command line utilities or will I have to resort to writing some script?

Thanks

  • 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-12T03:20:33+00:00Added an answer on June 12, 2026 at 3:20 am

    You need to write a script.
    gawk is the obvious candidate
    You could create an associative array in a BEGIN block, using FILENAME as the KEY and
    ATTR ” ” VALUE
    values as the value.
    Then create your output in an END block.
    gawk can process all txt files together by using *txt as the filename

    It’s a bit optimistic to expect there to be a ready made command to do exactly what you want.
    Very few command join data horizontally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a directory with files that look like this: 001_something.php 002_something_else.php 004_xyz.php 005_do_good_to_others.php
I have a large number of csv files that look like this below: xxxxxxxx
I have seen config files(yes, text files) for various console applications that look like
I have an array of folders/files that looks like this: Array ( [Root Folder
I have a JQuery validation files that look as follow: $('#TextBoxRisultati2b').on('blur', function () {
I have some files that need to be sorted by name, unfortunately I can't
I have some files that I would like to rename using regex and powershell,
I have some files that I'd like to delete the last newline if it
I have a block of C# that looks like this public static string[,] FileTypesDict
I have some files that are uuencoded, and I need to decode them, using

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.