Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Liy
    Member
    • Feb 2012
    • 19

    #1

    text file editing

    Dear all,

    I have a problem that i cannot solve and I hope someone here can help me.

    I have two text files with one column of values.
    Example:

    File1:
    67
    94
    95
    .
    .

    File2
    0.1
    0.003
    0.5
    .
    .

    File1 contains the row numbers that value I need from File2. For example the output should be like this:

    Theoretical outfile:
    0.4 (row 67 from File2)
    0.5 (row 94 from File2)
    0.1 (row 95 from File2)
    etc...

    Is it possible to do this with awk?

    I would really appritiate if someone can help me.

    Thanks,
    Liy
  • Liy
    Member
    • Feb 2012
    • 19

    #2
    solved

    awk 'FNR==NR{A[NR]=$0;next} ($0 in A){print A[$0]}' file2 file1

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      How Immunogenomics Decodes Immunity’s Genetic Blueprint
      by SEQadmin2




      The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

      This convergence of genetics, immunology, and computation...
      Yesterday, 05:41 AM
    • SEQadmin2
      Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
      by SEQadmin2



      CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

      Despite this, “CRISPR helped turn genome editing from a specialized technique into
      ...
      07-31-2026, 11:01 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 08-24-2026, 10:32 AM
    0 responses
    42 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 08-20-2026, 11:17 AM
    0 responses
    48 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 08-18-2026, 10:05 AM
    0 responses
    55 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 08-13-2026, 12:22 PM
    0 responses
    50 views
    0 reactions
    Last Post SEQadmin2  
    Working...