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

  • Home
  • SEARCH
  • 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 7766083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:19:29+00:00 2026-06-01T15:19:29+00:00

I have this fixed-width file with the widths being 34, 2, 3, 2, 1,

  • 0

I have this fixed-width file with the widths being 34, 2, 3, 2, 1, 1, 3, 1, 2, 1, 2, 2 and 75 which I want to (a) convert to delimited (csv) format and then (b) subset according to V2=”03″ and V5=”1″. I have figured out the first step:

awk -v FIELDWIDTHS='34 2 3 2 1 1 3 1 2 1 2 2 75' -v OFS=',' '{ $1=$1 ""; print }' </filepath/Parse.txt > /filepath/Parse.csv

But I am stumped at step 2.

  • 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-01T15:19:30+00:00Added an answer on June 1, 2026 at 3:19 pm

    Try with:

    awk -v FIELDWIDTHS='...' -v OFS=',' '($2=="03") && ($5=="1"){ $1=$1 ""; print }'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fixed width text file, which has been unpacked from Comp-3 data
Assume I have a regular fixed width file that is sorted on one of
I have a UIButton of fixed width and I want to place text in
I have a 10GB CSV file which is essentially a huge square matrix. I
I have an app that loops through a fixed width text file, reads each
I am trying to read this file (3.8mb) using its fixed-width structure as described
I have a fixed-width flat file. To make matters worse, each line can either
I have a problem with IE. I have a fixed div like this: #fixed
I'm currently working on wholesale online t-shirt shop. I have done this for fixed
I have HTML like this: <input type=radio name=type value=FL checked=checked />Fixed <input type=radio name=type

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.