Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. sbgirl54

    Why does this not work...

    That works, and it's clever (: Thanks
  2. sbgirl54

    Why does this not work...

    This doesn't work: awk ' NR == FNR { x=$1 ; next } { y=$1 } {if (x==y) print $0} ' file1.in catalog.cat > file2.res I'm trying to make a list of catalog entries that match the line headers in file1. The program instead outputs a copy of file1. That doesn't make...
  3. sbgirl54

    building from multiple files

    That clarifies so many things. Thank you
  4. sbgirl54

    building from multiple files

    Thanks again! Could you just explain a detail to me please? My file ended up with too many lines, so I added this command: awk -v n=13 'NR>n{print a[NR%n]}{a[NR%n]=$0}' to removes the last 13 lines, it works, but I would rather use awk -v n=NR/2 'NR>n{print a[NR%n]}{a[NR%n]=$0}' to remove...
  5. sbgirl54

    building from multiple files

    Yo, thank you :) That's very helpful. It work and I also sorted the headers. I really augth to learn this awk thing better, it's quite impressive what it can achieve.
  6. sbgirl54

    building from multiple files

    I forgot to say x1 to x13 in the last table are headers, they're not part of any previous file.
  7. sbgirl54

    building from multiple files

    Hi! Basically, I have 2 text files and need to combine them into one while making a few changes. The commands I came up with were too long/slow so I figured some more familiar with awk could help me. Basically I have these 2 files, were N~50000 : file1.res 1 a1 a2 ... a13 2 b1 b2 ... b13 ...

Part and Inventory Search

Back
Top