Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Problem with awk command

    Hello every bodies,
    I would like to cut a file composed of 999 columns which 1000 values in each column, and I've been thinking on using the command awk

    When typing :
    awk '{print $1}' latin_center_999_1000.txt > latin001

    I copy easily the first row but I would like to code this process in order to stock a number of column in the next files.
    For example, latin0015 will contain columns from 1 to 15
    Which command should I use to realize that ?
    I believe that something like

    awk '{print $1something$15}' latin_center_999_1000.txt > latin001

    does it, so does anyone have an idea ?



  2. #2
    Linux User
    Join Date
    Jan 2007
    welcome to the forum

    > write selected columns to file

    the utility "cut" is designed for this: v. man cut
    the sun is new every day (heraclitus)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts